summaryrefslogtreecommitdiffstats
path: root/image/test
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-11-21 12:57:17 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-12-04 20:02:14 +0100
commitc5d5a28f76524886f185ba50b230e8ce0d08eacb (patch)
treeaadacb3626783986111afec138fc86a7d10a8b38 /image/test
parenta0e20005efe7a794f9a824693e13f8874e087445 (diff)
downloadUXP-c5d5a28f76524886f185ba50b230e8ce0d08eacb.tar
UXP-c5d5a28f76524886f185ba50b230e8ce0d08eacb.tar.gz
UXP-c5d5a28f76524886f185ba50b230e8ce0d08eacb.tar.lz
UXP-c5d5a28f76524886f185ba50b230e8ce0d08eacb.tar.xz
UXP-c5d5a28f76524886f185ba50b230e8ce0d08eacb.zip
Bug 1462355 - Part 1b. Update Decoder and SurfacePipe plumbing to use updated imgFrame methods.
Diffstat (limited to 'image/test')
-rw-r--r--image/test/gtest/Common.h4
-rw-r--r--image/test/gtest/TestADAM7InterpolatingFilter.cpp6
-rw-r--r--image/test/gtest/TestDeinterlacingFilter.cpp6
-rw-r--r--image/test/gtest/TestDownscalingFilter.cpp6
-rw-r--r--image/test/gtest/TestDownscalingFilterNoSkia.cpp2
-rw-r--r--image/test/gtest/TestRemoveFrameRectFilter.cpp6
-rw-r--r--image/test/gtest/TestSurfacePipeIntegration.cpp20
-rw-r--r--image/test/gtest/TestSurfaceSink.cpp4
8 files changed, 27 insertions, 27 deletions
diff --git a/image/test/gtest/Common.h b/image/test/gtest/Common.h
index 79bed9fc1..0c288cddc 100644
--- a/image/test/gtest/Common.h
+++ b/image/test/gtest/Common.h
@@ -245,7 +245,7 @@ already_AddRefed<Decoder> CreateTrivialDecoder();
* @param aConfigs The configuration for the pipeline.
*/
template <typename Func, typename... Configs>
-void WithFilterPipeline(Decoder* aDecoder, Func aFunc, Configs... aConfigs)
+void WithFilterPipeline(Decoder* aDecoder, Func aFunc, const Configs&... aConfigs)
{
auto pipe = MakeUnique<typename detail::FilterPipeline<Configs...>::Type>();
nsresult rv = pipe->Configure(aConfigs...);
@@ -268,7 +268,7 @@ void WithFilterPipeline(Decoder* aDecoder, Func aFunc, Configs... aConfigs)
* @param aConfigs The configuration for the pipeline.
*/
template <typename... Configs>
-void AssertConfiguringPipelineFails(Decoder* aDecoder, Configs... aConfigs)
+void AssertConfiguringPipelineFails(Decoder* aDecoder, const Configs&... aConfigs)
{
auto pipe = MakeUnique<typename detail::FilterPipeline<Configs...>::Type>();
nsresult rv = pipe->Configure(aConfigs...);
diff --git a/image/test/gtest/TestADAM7InterpolatingFilter.cpp b/image/test/gtest/TestADAM7InterpolatingFilter.cpp
index d9dab4346..d11224251 100644
--- a/image/test/gtest/TestADAM7InterpolatingFilter.cpp
+++ b/image/test/gtest/TestADAM7InterpolatingFilter.cpp
@@ -33,7 +33,7 @@ WithADAM7InterpolatingFilter(const IntSize& aSize, Func aFunc)
WithFilterPipeline(decoder, Forward<Func>(aFunc),
ADAM7InterpolatingConfig { },
- SurfaceConfig { decoder, 0, aSize,
+ SurfaceConfig { decoder, aSize,
SurfaceFormat::B8G8R8A8, false });
}
@@ -45,7 +45,7 @@ AssertConfiguringADAM7InterpolatingFilterFails(const IntSize& aSize)
AssertConfiguringPipelineFails(decoder,
ADAM7InterpolatingConfig { },
- SurfaceConfig { decoder, 0, aSize,
+ SurfaceConfig { decoder, aSize,
SurfaceFormat::B8G8R8A8, false });
}
@@ -664,7 +664,7 @@ TEST(ImageADAM7InterpolatingFilter, ConfiguringPalettedADAM7InterpolatingFilterF
// should fail.
AssertConfiguringPipelineFails(decoder,
ADAM7InterpolatingConfig { },
- PalettedSurfaceConfig { decoder, 0, IntSize(100, 100),
+ PalettedSurfaceConfig { decoder, IntSize(100, 100),
IntRect(0, 0, 50, 50),
SurfaceFormat::B8G8R8A8, 8,
false });
diff --git a/image/test/gtest/TestDeinterlacingFilter.cpp b/image/test/gtest/TestDeinterlacingFilter.cpp
index 30cad7993..82637bbf7 100644
--- a/image/test/gtest/TestDeinterlacingFilter.cpp
+++ b/image/test/gtest/TestDeinterlacingFilter.cpp
@@ -28,7 +28,7 @@ WithDeinterlacingFilter(const IntSize& aSize,
WithFilterPipeline(decoder, Forward<Func>(aFunc),
DeinterlacingConfig<uint32_t> { aProgressiveDisplay },
- SurfaceConfig { decoder, 0, aSize,
+ SurfaceConfig { decoder, aSize,
SurfaceFormat::B8G8R8A8, false });
}
@@ -41,7 +41,7 @@ WithPalettedDeinterlacingFilter(const IntSize& aSize,
WithFilterPipeline(decoder, Forward<Func>(aFunc),
DeinterlacingConfig<uint8_t> { /* mProgressiveDisplay = */ true },
- PalettedSurfaceConfig { decoder, 0, aSize,
+ PalettedSurfaceConfig { decoder, aSize,
IntRect(0, 0, 100, 100),
SurfaceFormat::B8G8R8A8, 8,
false });
@@ -55,7 +55,7 @@ AssertConfiguringDeinterlacingFilterFails(const IntSize& aSize)
AssertConfiguringPipelineFails(decoder,
DeinterlacingConfig<uint32_t> { /* mProgressiveDisplay = */ true},
- SurfaceConfig { decoder, 0, aSize,
+ SurfaceConfig { decoder, aSize,
SurfaceFormat::B8G8R8A8, false });
}
diff --git a/image/test/gtest/TestDownscalingFilter.cpp b/image/test/gtest/TestDownscalingFilter.cpp
index 596becab0..d7aa0ead2 100644
--- a/image/test/gtest/TestDownscalingFilter.cpp
+++ b/image/test/gtest/TestDownscalingFilter.cpp
@@ -29,7 +29,7 @@ WithDownscalingFilter(const IntSize& aInputSize,
WithFilterPipeline(decoder, Forward<Func>(aFunc),
DownscalingConfig { aInputSize,
SurfaceFormat::B8G8R8A8 },
- SurfaceConfig { decoder, 0, aOutputSize,
+ SurfaceConfig { decoder, aOutputSize,
SurfaceFormat::B8G8R8A8, false });
}
@@ -43,7 +43,7 @@ AssertConfiguringDownscalingFilterFails(const IntSize& aInputSize,
AssertConfiguringPipelineFails(decoder,
DownscalingConfig { aInputSize,
SurfaceFormat::B8G8R8A8 },
- SurfaceConfig { decoder, 0, aOutputSize,
+ SurfaceConfig { decoder, aOutputSize,
SurfaceFormat::B8G8R8A8, false });
}
@@ -224,7 +224,7 @@ TEST(ImageDownscalingFilter, ConfiguringPalettedDownscaleFails)
AssertConfiguringPipelineFails(decoder,
DownscalingConfig { IntSize(100, 100),
SurfaceFormat::B8G8R8A8 },
- PalettedSurfaceConfig { decoder, 0, IntSize(20, 20),
+ PalettedSurfaceConfig { decoder, IntSize(20, 20),
IntRect(0, 0, 20, 20),
SurfaceFormat::B8G8R8A8, 8,
false });
diff --git a/image/test/gtest/TestDownscalingFilterNoSkia.cpp b/image/test/gtest/TestDownscalingFilterNoSkia.cpp
index c62ca018d..80928a880 100644
--- a/image/test/gtest/TestDownscalingFilterNoSkia.cpp
+++ b/image/test/gtest/TestDownscalingFilterNoSkia.cpp
@@ -52,6 +52,6 @@ TEST(ImageDownscalingFilter, NoSkia)
AssertConfiguringPipelineFails(decoder,
DownscalingConfig { IntSize(100, 100),
SurfaceFormat::B8G8R8A8 },
- SurfaceConfig { decoder, 0, IntSize(50, 50),
+ SurfaceConfig { decoder, IntSize(50, 50),
SurfaceFormat::B8G8R8A8, false });
}
diff --git a/image/test/gtest/TestRemoveFrameRectFilter.cpp b/image/test/gtest/TestRemoveFrameRectFilter.cpp
index e1def590e..ad1f944fc 100644
--- a/image/test/gtest/TestRemoveFrameRectFilter.cpp
+++ b/image/test/gtest/TestRemoveFrameRectFilter.cpp
@@ -28,7 +28,7 @@ WithRemoveFrameRectFilter(const IntSize& aSize,
WithFilterPipeline(decoder, Forward<Func>(aFunc),
RemoveFrameRectConfig { aFrameRect },
- SurfaceConfig { decoder, 0, aSize,
+ SurfaceConfig { decoder, aSize,
SurfaceFormat::B8G8R8A8, false });
}
@@ -41,7 +41,7 @@ AssertConfiguringRemoveFrameRectFilterFails(const IntSize& aSize,
AssertConfiguringPipelineFails(decoder,
RemoveFrameRectConfig { aFrameRect },
- SurfaceConfig { decoder, 0, aSize,
+ SurfaceConfig { decoder, aSize,
SurfaceFormat::B8G8R8A8, false });
}
@@ -320,7 +320,7 @@ TEST(ImageRemoveFrameRectFilter, ConfiguringPalettedRemoveFrameRectFails)
// should fail.
AssertConfiguringPipelineFails(decoder,
RemoveFrameRectConfig { IntRect(0, 0, 50, 50) },
- PalettedSurfaceConfig { decoder, 0, IntSize(100, 100),
+ PalettedSurfaceConfig { decoder, IntSize(100, 100),
IntRect(0, 0, 50, 50),
SurfaceFormat::B8G8R8A8, 8,
false });
diff --git a/image/test/gtest/TestSurfacePipeIntegration.cpp b/image/test/gtest/TestSurfacePipeIntegration.cpp
index 5e8c19fc2..27138a3ee 100644
--- a/image/test/gtest/TestSurfacePipeIntegration.cpp
+++ b/image/test/gtest/TestSurfacePipeIntegration.cpp
@@ -149,7 +149,7 @@ TEST_F(ImageSurfacePipeIntegration, SurfacePipe)
auto sink = MakeUnique<SurfaceSink>();
nsresult rv =
- sink->Configure(SurfaceConfig { decoder, 0, IntSize(100, 100),
+ sink->Configure(SurfaceConfig { decoder, IntSize(100, 100),
SurfaceFormat::B8G8R8A8, false });
ASSERT_TRUE(NS_SUCCEEDED(rv));
@@ -227,7 +227,7 @@ TEST_F(ImageSurfacePipeIntegration, PalettedSurfacePipe)
auto sink = MakeUnique<PalettedSurfaceSink>();
nsresult rv =
- sink->Configure(PalettedSurfaceConfig { decoder, 0, IntSize(100, 100),
+ sink->Configure(PalettedSurfaceConfig { decoder, IntSize(100, 100),
IntRect(0, 0, 100, 100),
SurfaceFormat::B8G8R8A8,
8, false });
@@ -313,7 +313,7 @@ TEST_F(ImageSurfacePipeIntegration, DeinterlaceDownscaleWritePixels)
DeinterlacingConfig<uint32_t> { /* mProgressiveDisplay = */ true },
DownscalingConfig { IntSize(100, 100),
SurfaceFormat::B8G8R8A8 },
- SurfaceConfig { decoder, 0, IntSize(25, 25),
+ SurfaceConfig { decoder, IntSize(25, 25),
SurfaceFormat::B8G8R8A8, false });
}
@@ -369,7 +369,7 @@ TEST_F(ImageSurfacePipeIntegration, RemoveFrameRectBottomRightDownscaleWritePixe
RemoveFrameRectConfig { IntRect(50, 50, 100, 100) },
DownscalingConfig { IntSize(100, 100),
SurfaceFormat::B8G8R8A8 },
- SurfaceConfig { decoder, 0, IntSize(20, 20),
+ SurfaceConfig { decoder, IntSize(20, 20),
SurfaceFormat::B8G8R8A8, false });
}
@@ -403,7 +403,7 @@ TEST_F(ImageSurfacePipeIntegration, RemoveFrameRectTopLeftDownscaleWritePixels)
RemoveFrameRectConfig { IntRect(-50, -50, 100, 100) },
DownscalingConfig { IntSize(100, 100),
SurfaceFormat::B8G8R8A8 },
- SurfaceConfig { decoder, 0, IntSize(20, 20),
+ SurfaceConfig { decoder, IntSize(20, 20),
SurfaceFormat::B8G8R8A8, false });
}
@@ -427,7 +427,7 @@ TEST_F(ImageSurfacePipeIntegration, DeinterlaceRemoveFrameRectWritePixels)
WithFilterPipeline(decoder, test,
DeinterlacingConfig<uint32_t> { /* mProgressiveDisplay = */ true },
RemoveFrameRectConfig { IntRect(50, 50, 100, 100) },
- SurfaceConfig { decoder, 0, IntSize(100, 100),
+ SurfaceConfig { decoder, IntSize(100, 100),
SurfaceFormat::B8G8R8A8, false });
}
@@ -450,7 +450,7 @@ TEST_F(ImageSurfacePipeIntegration, DeinterlaceRemoveFrameRectDownscaleWritePixe
RemoveFrameRectConfig { IntRect(50, 50, 100, 100) },
DownscalingConfig { IntSize(100, 100),
SurfaceFormat::B8G8R8A8 },
- SurfaceConfig { decoder, 0, IntSize(20, 20),
+ SurfaceConfig { decoder, IntSize(20, 20),
SurfaceFormat::B8G8R8A8, false });
}
@@ -465,7 +465,7 @@ TEST_F(ImageSurfacePipeIntegration, ConfiguringPalettedRemoveFrameRectDownscaleF
RemoveFrameRectConfig { IntRect(0, 0, 50, 50) },
DownscalingConfig { IntSize(100, 100),
SurfaceFormat::B8G8R8A8 },
- PalettedSurfaceConfig { decoder, 0, IntSize(100, 100),
+ PalettedSurfaceConfig { decoder, IntSize(100, 100),
IntRect(0, 0, 50, 50),
SurfaceFormat::B8G8R8A8, 8,
false });
@@ -482,7 +482,7 @@ TEST_F(ImageSurfacePipeIntegration, ConfiguringPalettedDeinterlaceDownscaleFails
DeinterlacingConfig<uint8_t> { /* mProgressiveDisplay = */ true},
DownscalingConfig { IntSize(100, 100),
SurfaceFormat::B8G8R8A8 },
- PalettedSurfaceConfig { decoder, 0, IntSize(100, 100),
+ PalettedSurfaceConfig { decoder, IntSize(100, 100),
IntRect(0, 0, 20, 20),
SurfaceFormat::B8G8R8A8, 8,
false });
@@ -503,6 +503,6 @@ TEST_F(ImageSurfacePipeIntegration, ConfiguringHugeDeinterlacingBufferFails)
DeinterlacingConfig<uint32_t> { /* mProgressiveDisplay = */ true},
DownscalingConfig { IntSize(60000, 60000),
SurfaceFormat::B8G8R8A8 },
- SurfaceConfig { decoder, 0, IntSize(600, 600),
+ SurfaceConfig { decoder, IntSize(600, 600),
SurfaceFormat::B8G8R8A8, false });
}
diff --git a/image/test/gtest/TestSurfaceSink.cpp b/image/test/gtest/TestSurfaceSink.cpp
index ccf9be3ec..3a1c74d12 100644
--- a/image/test/gtest/TestSurfaceSink.cpp
+++ b/image/test/gtest/TestSurfaceSink.cpp
@@ -32,7 +32,7 @@ WithSurfaceSink(Func aFunc)
const bool flipVertically = Orientation == Orient::FLIP_VERTICALLY;
WithFilterPipeline(decoder, Forward<Func>(aFunc),
- SurfaceConfig { decoder, 0, IntSize(100, 100),
+ SurfaceConfig { decoder, IntSize(100, 100),
SurfaceFormat::B8G8R8A8, flipVertically });
}
@@ -43,7 +43,7 @@ WithPalettedSurfaceSink(const IntRect& aFrameRect, Func aFunc)
ASSERT_TRUE(decoder != nullptr);
WithFilterPipeline(decoder, Forward<Func>(aFunc),
- PalettedSurfaceConfig { decoder, 0, IntSize(100, 100),
+ PalettedSurfaceConfig { decoder, IntSize(100, 100),
aFrameRect, SurfaceFormat::B8G8R8A8,
8, false });
}