diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-30 09:44:21 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-30 09:44:21 +0200 |
commit | a1a007a4856fa50d6d811c2268f881e3666f4c67 (patch) | |
tree | 24b082c1bfb5777f1770c82a534bf765160bc1b8 /gfx/tests | |
parent | eddd0de2ae80e176011f41a5400e81522d53f4f3 (diff) | |
parent | 59bf4204a84f7638d3f89a29bc7c04e5dc401369 (diff) | |
download | UXP-a1a007a4856fa50d6d811c2268f881e3666f4c67.tar UXP-a1a007a4856fa50d6d811c2268f881e3666f4c67.tar.gz UXP-a1a007a4856fa50d6d811c2268f881e3666f4c67.tar.lz UXP-a1a007a4856fa50d6d811c2268f881e3666f4c67.tar.xz UXP-a1a007a4856fa50d6d811c2268f881e3666f4c67.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into html_input_datetime_1
Diffstat (limited to 'gfx/tests')
-rw-r--r-- | gfx/tests/gtest/TestLayers.h | 16 | ||||
-rw-r--r-- | gfx/tests/gtest/TestTextures.cpp | 7 |
2 files changed, 21 insertions, 2 deletions
diff --git a/gfx/tests/gtest/TestLayers.h b/gfx/tests/gtest/TestLayers.h index 18e351f77..fc6b750f1 100644 --- a/gfx/tests/gtest/TestLayers.h +++ b/gfx/tests/gtest/TestLayers.h @@ -8,6 +8,22 @@ #include "Layers.h" #include "nsTArray.h" +#include "mozilla/layers/ISurfaceAllocator.h" + +namespace mozilla { +namespace layers { + +class TestSurfaceAllocator final : public ISurfaceAllocator +{ +public: + TestSurfaceAllocator() {} + ~TestSurfaceAllocator() override {} + + bool IsSameProcess() const override { return true; } +}; + +} // layers +} // mozilla /* Create layer tree from a simple layer tree description syntax. * Each index is either the first letter of the layer type or diff --git a/gfx/tests/gtest/TestTextures.cpp b/gfx/tests/gtest/TestTextures.cpp index b4856ae6b..8f413cb3b 100644 --- a/gfx/tests/gtest/TestTextures.cpp +++ b/gfx/tests/gtest/TestTextures.cpp @@ -5,6 +5,7 @@ #include "gtest/gtest.h" #include "gmock/gmock.h" +#include "TestLayers.h" #include "mozilla/gfx/2D.h" #include "mozilla/gfx/Tools.h" @@ -147,7 +148,8 @@ void TestTextureClientSurface(TextureClient* texture, gfxImageSurface* surface) ASSERT_NE(descriptor.type(), SurfaceDescriptor::Tnull_t); // host deserialization - RefPtr<TextureHost> host = CreateBackendIndependentTextureHost(descriptor, nullptr, + RefPtr<TestSurfaceAllocator> deallocator = new TestSurfaceAllocator(); + RefPtr<TextureHost> host = CreateBackendIndependentTextureHost(descriptor, deallocator, texture->GetFlags()); ASSERT_TRUE(host.get() != nullptr); @@ -191,7 +193,8 @@ void TestTextureClientYCbCr(TextureClient* client, PlanarYCbCrData& ycbcrData) { ASSERT_EQ(ycbcrDesc.stereoMode(), ycbcrData.mStereoMode); // host deserialization - RefPtr<TextureHost> textureHost = CreateBackendIndependentTextureHost(descriptor, nullptr, + RefPtr<TestSurfaceAllocator> deallocator = new TestSurfaceAllocator(); + RefPtr<TextureHost> textureHost = CreateBackendIndependentTextureHost(descriptor, deallocator, client->GetFlags()); RefPtr<BufferTextureHost> host = static_cast<BufferTextureHost*>(textureHost.get()); |