/src/mozilla-central/image/test/gtest/TestSurfaceSink.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #include "gtest/gtest.h" |
8 | | |
9 | | #include "mozilla/gfx/2D.h" |
10 | | #include "Common.h" |
11 | | #include "Decoder.h" |
12 | | #include "DecoderFactory.h" |
13 | | #include "SourceBuffer.h" |
14 | | #include "SurfacePipe.h" |
15 | | |
16 | | using namespace mozilla; |
17 | | using namespace mozilla::gfx; |
18 | | using namespace mozilla::image; |
19 | | |
20 | | enum class Orient |
21 | | { |
22 | | NORMAL, |
23 | | FLIP_VERTICALLY |
24 | | }; |
25 | | |
26 | | static void |
27 | | InitializeRowBuffer(uint32_t* aBuffer, |
28 | | size_t aSize, |
29 | | size_t aStartPixel, |
30 | | size_t aEndPixel, |
31 | | uint32_t aSetPixel) |
32 | 0 | { |
33 | 0 | uint32_t transparentPixel = BGRAColor::Transparent().AsPixel(); |
34 | 0 | for (size_t i = 0; i < aStartPixel && i < aSize; ++i) { |
35 | 0 | aBuffer[i] = transparentPixel; |
36 | 0 | } |
37 | 0 | for (size_t i = aStartPixel; i < aEndPixel && i < aSize; ++i) { |
38 | 0 | aBuffer[i] = aSetPixel; |
39 | 0 | } |
40 | 0 | for (size_t i = aEndPixel; i < aSize; ++i) { |
41 | 0 | aBuffer[i] = transparentPixel; |
42 | 0 | } |
43 | 0 | } |
44 | | |
45 | | template <Orient Orientation, typename Func> void |
46 | | WithSurfaceSink(Func aFunc) |
47 | 0 | { |
48 | 0 | RefPtr<Decoder> decoder = CreateTrivialDecoder(); |
49 | 0 | ASSERT_TRUE(decoder != nullptr); |
50 | 0 |
|
51 | 0 | const bool flipVertically = Orientation == Orient::FLIP_VERTICALLY; |
52 | 0 |
|
53 | 0 | WithFilterPipeline(decoder, std::forward<Func>(aFunc), |
54 | 0 | SurfaceConfig { decoder, IntSize(100, 100), |
55 | 0 | SurfaceFormat::B8G8R8A8, flipVertically }); |
56 | 0 | } Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkInitialization_Test::TestBody()::$_11>(ImageSurfaceSink_SurfaceSinkInitialization_Test::TestBody()::$_11) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWritePixels_Test::TestBody()::$_12>(ImageSurfaceSink_SurfaceSinkWritePixels_Test::TestBody()::$_12) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWritePixelsFinish_Test::TestBody()::$_13>(ImageSurfaceSink_SurfaceSinkWritePixelsFinish_Test::TestBody()::$_13) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWritePixelsEarlyExit_Test::TestBody()::$_14>(ImageSurfaceSink_SurfaceSinkWritePixelsEarlyExit_Test::TestBody()::$_14) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWritePixelsEarlyExit_Test::TestBody()::$_15>(ImageSurfaceSink_SurfaceSinkWritePixelsEarlyExit_Test::TestBody()::$_15) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWritePixelsEarlyExit_Test::TestBody()::$_16>(ImageSurfaceSink_SurfaceSinkWritePixelsEarlyExit_Test::TestBody()::$_16) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWritePixelsToRow_Test::TestBody()::$_17>(ImageSurfaceSink_SurfaceSinkWritePixelsToRow_Test::TestBody()::$_17) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWritePixelsToRowEarlyExit_Test::TestBody()::$_18>(ImageSurfaceSink_SurfaceSinkWritePixelsToRowEarlyExit_Test::TestBody()::$_18) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWritePixelsToRowEarlyExit_Test::TestBody()::$_19>(ImageSurfaceSink_SurfaceSinkWritePixelsToRowEarlyExit_Test::TestBody()::$_19) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWritePixelsToRowEarlyExit_Test::TestBody()::$_20>(ImageSurfaceSink_SurfaceSinkWritePixelsToRowEarlyExit_Test::TestBody()::$_20) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21>(ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22>(ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23>(ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24>(ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWriteBufferFromNullSource_Test::TestBody()::$_25>(ImageSurfaceSink_SurfaceSinkWriteBufferFromNullSource_Test::TestBody()::$_25) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26>(ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27>(ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWritePixelBlocks_Test::TestBody()::$_28>(ImageSurfaceSink_SurfaceSinkWritePixelBlocks_Test::TestBody()::$_28) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkWritePixelBlocksPartialRow_Test::TestBody()::$_29>(ImageSurfaceSink_SurfaceSinkWritePixelBlocksPartialRow_Test::TestBody()::$_29) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkProgressivePasses_Test::TestBody()::$_30>(ImageSurfaceSink_SurfaceSinkProgressivePasses_Test::TestBody()::$_30) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)0, ImageSurfaceSink_SurfaceSinkInvalidRect_Test::TestBody()::$_31>(ImageSurfaceSink_SurfaceSinkInvalidRect_Test::TestBody()::$_31) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithSurfaceSink<(Orient)1, ImageSurfaceSink_SurfaceSinkFlipVertically_Test::TestBody()::$_32>(ImageSurfaceSink_SurfaceSinkFlipVertically_Test::TestBody()::$_32) |
57 | | |
58 | | template <typename Func> void |
59 | | WithPalettedSurfaceSink(const IntRect& aFrameRect, Func aFunc) |
60 | 0 | { |
61 | 0 | RefPtr<Decoder> decoder = CreateTrivialDecoder(); |
62 | 0 | ASSERT_TRUE(decoder != nullptr); |
63 | 0 |
|
64 | 0 | WithFilterPipeline(decoder, std::forward<Func>(aFunc), |
65 | 0 | PalettedSurfaceConfig { decoder, IntSize(100, 100), |
66 | 0 | aFrameRect, SurfaceFormat::B8G8R8A8, |
67 | 0 | 8, false }); |
68 | 0 | } Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkInitialization_Test::TestBody()::$_33>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkInitialization_Test::TestBody()::$_33) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWritePixelsFor0_0_100_100_Test::TestBody()::$_34>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWritePixelsFor0_0_100_100_Test::TestBody()::$_34) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWritePixelsFor25_25_50_50_Test::TestBody()::$_35>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWritePixelsFor25_25_50_50_Test::TestBody()::$_35) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWritePixelsForMinus25_Minus25_50_50_Test::TestBody()::$_36>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWritePixelsForMinus25_Minus25_50_50_Test::TestBody()::$_36) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWritePixelsFor75_Minus25_50_50_Test::TestBody()::$_37>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWritePixelsFor75_Minus25_50_50_Test::TestBody()::$_37) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWritePixelsForMinus25_75_50_50_Test::TestBody()::$_38>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWritePixelsForMinus25_75_50_50_Test::TestBody()::$_38) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWritePixelsFor75_75_50_50_Test::TestBody()::$_39>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWritePixelsFor75_75_50_50_Test::TestBody()::$_39) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWritePixelsFinish_Test::TestBody()::$_40>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWritePixelsFinish_Test::TestBody()::$_40) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWritePixelsEarlyExit_Test::TestBody()::$_41>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWritePixelsEarlyExit_Test::TestBody()::$_41) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWritePixelsEarlyExit_Test::TestBody()::$_42>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWritePixelsEarlyExit_Test::TestBody()::$_42) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWritePixelsEarlyExit_Test::TestBody()::$_43>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWritePixelsEarlyExit_Test::TestBody()::$_43) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWritePixelsToRow_Test::TestBody()::$_44>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWritePixelsToRow_Test::TestBody()::$_44) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWritePixelsToRowEarlyExit_Test::TestBody()::$_45>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWritePixelsToRowEarlyExit_Test::TestBody()::$_45) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWritePixelsToRowEarlyExit_Test::TestBody()::$_46>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWritePixelsToRowEarlyExit_Test::TestBody()::$_46) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWritePixelsToRowEarlyExit_Test::TestBody()::$_47>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWritePixelsToRowEarlyExit_Test::TestBody()::$_47) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferFromNullSource_Test::TestBody()::$_52>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferFromNullSource_Test::TestBody()::$_52) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void WithPalettedSurfaceSink<ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54>(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54) |
69 | | |
70 | | void |
71 | | ResetForNextPass(SurfaceFilter* aSink) |
72 | 0 | { |
73 | 0 | aSink->ResetToFirstRow(); |
74 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
75 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
76 | 0 | EXPECT_TRUE(invalidRect.isNothing()); |
77 | 0 | } |
78 | | |
79 | | template <typename WriteFunc, typename CheckFunc> void |
80 | | DoCheckIterativeWrite(SurfaceFilter* aSink, |
81 | | WriteFunc aWriteFunc, |
82 | | CheckFunc aCheckFunc) |
83 | 0 | { |
84 | 0 | // Write the buffer to successive rows until every row of the surface |
85 | 0 | // has been written. |
86 | 0 | uint32_t row = 0; |
87 | 0 | WriteState result = WriteState::NEED_MORE_DATA; |
88 | 0 | while (result == WriteState::NEED_MORE_DATA) { |
89 | 0 | result = aWriteFunc(row); |
90 | 0 | ++row; |
91 | 0 | } |
92 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
93 | 0 | EXPECT_EQ(100u, row); |
94 | 0 |
|
95 | 0 | AssertCorrectPipelineFinalState(aSink, |
96 | 0 | IntRect(0, 0, 100, 100), |
97 | 0 | IntRect(0, 0, 100, 100)); |
98 | 0 |
|
99 | 0 | // Check that the generated image is correct. |
100 | 0 | aCheckFunc(); |
101 | 0 | } Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}, void CheckIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, void CheckIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}, void CheckIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, void CheckIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}, void CheckIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, void CheckIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2})::{lambda(unsigned int)#1}, void CheckIterativeWrite<{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, void CheckIterativeWrite<{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}, void CheckIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, void CheckIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2})::{lambda(unsigned int)#1}, void CheckIterativeWrite<{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, void CheckIterativeWrite<{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}, void CheckIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, void CheckIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3})::{lambda(unsigned int)#1}, void CheckIterativeWrite<{lambda()#3}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3}::UnknownUnits> const&, void CheckIterativeWrite<{lambda()#3}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda(unsigned int)#1}, ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#4}>(mozilla::image::SurfaceFilter*, ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda(unsigned int)#1}, ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#4}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}, void CheckIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, void CheckIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}, void CheckPalettedIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, void CheckPalettedIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}, void CheckPalettedIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, void CheckPalettedIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}, void CheckPalettedIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, void CheckPalettedIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2})::{lambda(unsigned int)#1}, void CheckPalettedIterativeWrite<{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, void CheckPalettedIterativeWrite<{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}, void CheckPalettedIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, void CheckPalettedIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2})::{lambda(unsigned int)#1}, void CheckPalettedIterativeWrite<{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, void CheckPalettedIterativeWrite<{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}, void CheckPalettedIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, void CheckPalettedIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3})::{lambda(unsigned int)#1}, void CheckPalettedIterativeWrite<{lambda()#3}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3}::UnknownUnits> const&, void CheckPalettedIterativeWrite<{lambda()#3}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3}::UnknownUnits> const&)::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda(unsigned int)#1}, ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#4}>(mozilla::image::SurfaceFilter*, ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda(unsigned int)#1}, ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#4}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void DoCheckIterativeWrite<void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}, void CheckPalettedIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}>(mozilla::image::SurfaceFilter*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, void CheckPalettedIterativeWrite<{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&)::{lambda()#1}) |
102 | | |
103 | | template <typename WriteFunc> void |
104 | | CheckIterativeWrite(Decoder* aDecoder, |
105 | | SurfaceSink* aSink, |
106 | | const IntRect& aOutputRect, |
107 | | WriteFunc aWriteFunc) |
108 | 0 | { |
109 | 0 | // Ignore the row passed to WriteFunc, since no callers use it. |
110 | 0 | auto writeFunc = [&](uint32_t) { |
111 | 0 | return aWriteFunc(); |
112 | 0 | }; Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}::operator()(unsigned int) const |
113 | 0 |
|
114 | 0 | DoCheckIterativeWrite(aSink, writeFunc, [&]{ |
115 | 0 | CheckGeneratedImage(aDecoder, aOutputRect); |
116 | 0 | }); Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1})::{lambda()#1}::operator()() const |
117 | 0 | } Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBuffer_Test::TestBody()::$_21::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_22::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_23::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_24::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#2}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteEmptyRow_Test::TestBody()::$_26::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#3}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckIterativeWrite<ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::SurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_SurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_27::operator()(mozilla::image::Decoder*, mozilla::image::SurfaceSink*) const::{lambda()#1}) |
118 | | |
119 | | template <typename WriteFunc> void |
120 | | CheckPalettedIterativeWrite(Decoder* aDecoder, |
121 | | PalettedSurfaceSink* aSink, |
122 | | const IntRect& aOutputRect, |
123 | | WriteFunc aWriteFunc) |
124 | 0 | { |
125 | 0 | // Ignore the row passed to WriteFunc, since no callers use it. |
126 | 0 | auto writeFunc = [&](uint32_t) { |
127 | 0 | return aWriteFunc(); |
128 | 0 | }; Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3})::{lambda(unsigned int)#1}::operator()(unsigned int) const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda(unsigned int)#1}::operator()(unsigned int) const |
129 | 0 |
|
130 | 0 | DoCheckIterativeWrite(aSink, writeFunc, [&]{ |
131 | 0 | CheckGeneratedPalettedImage(aDecoder, aOutputRect); |
132 | 0 | }); Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3})::{lambda()#1}::operator()() const Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1})::{lambda()#1}::operator()() const |
133 | 0 | } Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBuffer_Test::TestBody()::$_48::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRow_Test::TestBody()::$_49::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow_Test::TestBody()::$_50::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow_Test::TestBody()::$_51::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#2}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteEmptyRow_Test::TestBody()::$_53::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#3}) Unexecuted instantiation: Unified_cpp_image_test_gtest1.cpp:void CheckPalettedIterativeWrite<ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}>(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*, mozilla::gfx::IntRectTyped<ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}::UnknownUnits> const&, ImageSurfaceSink_PalettedSurfaceSinkWriteUnsafeComputedRow_Test::TestBody()::$_54::operator()(mozilla::image::Decoder*, mozilla::image::PalettedSurfaceSink*) const::{lambda()#1}) |
134 | | |
135 | | TEST(ImageSurfaceSink, SurfaceSinkInitialization) |
136 | 0 | { |
137 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
138 | 0 | // Check initial state. |
139 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
140 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
141 | 0 | EXPECT_TRUE(invalidRect.isNothing()); |
142 | 0 |
|
143 | 0 | // Check that the surface is zero-initialized. We verify this by calling |
144 | 0 | // CheckGeneratedImage() and telling it that we didn't write to the surface |
145 | 0 | // anyway (i.e., we wrote to the empty rect); it will then expect the entire |
146 | 0 | // surface to be transparent, which is what it should be if it was |
147 | 0 | // zero-initialied. |
148 | 0 | CheckGeneratedImage(aDecoder, IntRect(0, 0, 0, 0)); |
149 | 0 | }); |
150 | 0 | } |
151 | | |
152 | | TEST(ImageSurfaceSink, SurfaceSinkWritePixels) |
153 | 0 | { |
154 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
155 | 0 | CheckWritePixels(aDecoder, aSink); |
156 | 0 | }); |
157 | 0 | } |
158 | | |
159 | | TEST(ImageSurfaceSink, SurfaceSinkWritePixelsFinish) |
160 | 0 | { |
161 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
162 | 0 | // Write nothing into the surface; just finish immediately. |
163 | 0 | uint32_t count = 0; |
164 | 0 | auto result = aSink->WritePixels<uint32_t>([&]() { |
165 | 0 | count++; |
166 | 0 | return AsVariant(WriteState::FINISHED); |
167 | 0 | }); |
168 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
169 | 0 | EXPECT_EQ(1u, count); |
170 | 0 |
|
171 | 0 | AssertCorrectPipelineFinalState(aSink, |
172 | 0 | IntRect(0, 0, 100, 100), |
173 | 0 | IntRect(0, 0, 100, 100)); |
174 | 0 |
|
175 | 0 | // Attempt to write more and make sure that nothing gets written. |
176 | 0 | count = 0; |
177 | 0 | result = aSink->WritePixels<uint32_t>([&]() { |
178 | 0 | count++; |
179 | 0 | return AsVariant(BGRAColor::Red().AsPixel()); |
180 | 0 | }); |
181 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
182 | 0 | EXPECT_EQ(0u, count); |
183 | 0 | EXPECT_TRUE(aSink->IsSurfaceFinished()); |
184 | 0 |
|
185 | 0 | // Check that the generated image is correct. |
186 | 0 | RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); |
187 | 0 | RefPtr<SourceSurface> surface = currentFrame->GetSourceSurface(); |
188 | 0 | EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Transparent())); |
189 | 0 | }); |
190 | 0 | } |
191 | | |
192 | | TEST(ImageSurfaceSink, SurfaceSinkWritePixelsEarlyExit) |
193 | 0 | { |
194 | 0 | auto checkEarlyExit = |
195 | 0 | [](Decoder* aDecoder, SurfaceSink* aSink, WriteState aState) { |
196 | 0 | // Write half a row of green pixels and then exit early with |aState|. If |
197 | 0 | // the lambda keeps getting called, we'll write red pixels, which will cause |
198 | 0 | // the test to fail. |
199 | 0 | uint32_t count = 0; |
200 | 0 | auto result = aSink->WritePixels<uint32_t>([&]() -> NextPixel<uint32_t> { |
201 | 0 | if (count == 50) { |
202 | 0 | return AsVariant(aState); |
203 | 0 | } |
204 | 0 | return count++ < 50 ? AsVariant(BGRAColor::Green().AsPixel()) |
205 | 0 | : AsVariant(BGRAColor::Red().AsPixel()); |
206 | 0 | }); |
207 | 0 |
|
208 | 0 | EXPECT_EQ(aState, result); |
209 | 0 | EXPECT_EQ(50u, count); |
210 | 0 | CheckGeneratedImage(aDecoder, IntRect(0, 0, 50, 1)); |
211 | 0 |
|
212 | 0 | if (aState != WriteState::FINISHED) { |
213 | 0 | // We should still be able to write more at this point. |
214 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
215 | 0 |
|
216 | 0 | // Verify that we can resume writing. We'll finish up the same row. |
217 | 0 | count = 0; |
218 | 0 | result = aSink->WritePixels<uint32_t>([&]() -> NextPixel<uint32_t> { |
219 | 0 | if (count == 50) { |
220 | 0 | return AsVariant(WriteState::NEED_MORE_DATA); |
221 | 0 | } |
222 | 0 | ++count; |
223 | 0 | return AsVariant(BGRAColor::Green().AsPixel()); |
224 | 0 | }); |
225 | 0 |
|
226 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
227 | 0 | EXPECT_EQ(50u, count); |
228 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
229 | 0 | CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, 1)); |
230 | 0 |
|
231 | 0 | return; |
232 | 0 | } |
233 | 0 | |
234 | 0 | // We should've finished the surface at this point. |
235 | 0 | AssertCorrectPipelineFinalState(aSink, |
236 | 0 | IntRect(0, 0, 100, 100), |
237 | 0 | IntRect(0, 0, 100, 100)); |
238 | 0 |
|
239 | 0 | // Attempt to write more and make sure that nothing gets written. |
240 | 0 | count = 0; |
241 | 0 | result = aSink->WritePixels<uint32_t>([&]{ |
242 | 0 | count++; |
243 | 0 | return AsVariant(BGRAColor::Red().AsPixel()); |
244 | 0 | }); |
245 | 0 |
|
246 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
247 | 0 | EXPECT_EQ(0u, count); |
248 | 0 | EXPECT_TRUE(aSink->IsSurfaceFinished()); |
249 | 0 |
|
250 | 0 | // Check that the generated image is still correct. |
251 | 0 | CheckGeneratedImage(aDecoder, IntRect(0, 0, 50, 1)); |
252 | 0 | }; |
253 | 0 |
|
254 | 0 | WithSurfaceSink<Orient::NORMAL>([&](Decoder* aDecoder, SurfaceSink* aSink) { |
255 | 0 | checkEarlyExit(aDecoder, aSink, WriteState::NEED_MORE_DATA); |
256 | 0 | }); |
257 | 0 |
|
258 | 0 | WithSurfaceSink<Orient::NORMAL>([&](Decoder* aDecoder, SurfaceSink* aSink) { |
259 | 0 | checkEarlyExit(aDecoder, aSink, WriteState::FAILURE); |
260 | 0 | }); |
261 | 0 |
|
262 | 0 | WithSurfaceSink<Orient::NORMAL>([&](Decoder* aDecoder, SurfaceSink* aSink) { |
263 | 0 | checkEarlyExit(aDecoder, aSink, WriteState::FINISHED); |
264 | 0 | }); |
265 | 0 | } |
266 | | |
267 | | TEST(ImageSurfaceSink, SurfaceSinkWritePixelsToRow) |
268 | 0 | { |
269 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
270 | 0 | // Write the first 99 rows of our 100x100 surface and verify that even |
271 | 0 | // though our lambda will yield pixels forever, only one row is written per |
272 | 0 | // call to WritePixelsToRow(). |
273 | 0 | for (int row = 0; row < 99; ++row) { |
274 | 0 | uint32_t count = 0; |
275 | 0 | WriteState result = aSink->WritePixelsToRow<uint32_t>([&]{ |
276 | 0 | ++count; |
277 | 0 | return AsVariant(BGRAColor::Green().AsPixel()); |
278 | 0 | }); |
279 | 0 |
|
280 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
281 | 0 | EXPECT_EQ(100u, count); |
282 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
283 | 0 |
|
284 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
285 | 0 | EXPECT_TRUE(invalidRect.isSome()); |
286 | 0 | EXPECT_EQ(IntRect(0, row, 100, 1), invalidRect->mInputSpaceRect); |
287 | 0 | EXPECT_EQ(IntRect(0, row, 100, 1), invalidRect->mOutputSpaceRect); |
288 | 0 |
|
289 | 0 | CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, row + 1)); |
290 | 0 | } |
291 | 0 |
|
292 | 0 | // Write the final line, which should finish the surface. |
293 | 0 | uint32_t count = 0; |
294 | 0 | WriteState result = aSink->WritePixelsToRow<uint32_t>([&]{ |
295 | 0 | ++count; |
296 | 0 | return AsVariant(BGRAColor::Green().AsPixel()); |
297 | 0 | }); |
298 | 0 |
|
299 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
300 | 0 | EXPECT_EQ(100u, count); |
301 | 0 |
|
302 | 0 | // Note that the final invalid rect we expect here is only the last row; |
303 | 0 | // that's because we called TakeInvalidRect() repeatedly in the loop above. |
304 | 0 | AssertCorrectPipelineFinalState(aSink, |
305 | 0 | IntRect(0, 99, 100, 1), |
306 | 0 | IntRect(0, 99, 100, 1)); |
307 | 0 |
|
308 | 0 | // Check that the generated image is correct. |
309 | 0 | CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, 100)); |
310 | 0 |
|
311 | 0 | // Attempt to write more and make sure that nothing gets written. |
312 | 0 | count = 0; |
313 | 0 | result = aSink->WritePixelsToRow<uint32_t>([&]{ |
314 | 0 | count++; |
315 | 0 | return AsVariant(BGRAColor::Red().AsPixel()); |
316 | 0 | }); |
317 | 0 |
|
318 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
319 | 0 | EXPECT_EQ(0u, count); |
320 | 0 | EXPECT_TRUE(aSink->IsSurfaceFinished()); |
321 | 0 |
|
322 | 0 | // Check that the generated image is still correct. |
323 | 0 | CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, 100)); |
324 | 0 | }); |
325 | 0 | } |
326 | | |
327 | | TEST(ImageSurfaceSink, SurfaceSinkWritePixelsToRowEarlyExit) |
328 | 0 | { |
329 | 0 | auto checkEarlyExit = |
330 | 0 | [](Decoder* aDecoder, SurfaceSink* aSink, WriteState aState) { |
331 | 0 | // Write half a row of green pixels and then exit early with |aState|. If |
332 | 0 | // the lambda keeps getting called, we'll write red pixels, which will cause |
333 | 0 | // the test to fail. |
334 | 0 | uint32_t count = 0; |
335 | 0 | auto result = aSink->WritePixelsToRow<uint32_t>([&]() -> NextPixel<uint32_t> { |
336 | 0 | if (count == 50) { |
337 | 0 | return AsVariant(aState); |
338 | 0 | } |
339 | 0 | return count++ < 50 ? AsVariant(BGRAColor::Green().AsPixel()) |
340 | 0 | : AsVariant(BGRAColor::Red().AsPixel()); |
341 | 0 | }); |
342 | 0 |
|
343 | 0 | EXPECT_EQ(aState, result); |
344 | 0 | EXPECT_EQ(50u, count); |
345 | 0 | CheckGeneratedImage(aDecoder, IntRect(0, 0, 50, 1)); |
346 | 0 |
|
347 | 0 | if (aState != WriteState::FINISHED) { |
348 | 0 | // We should still be able to write more at this point. |
349 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
350 | 0 |
|
351 | 0 | // Verify that we can resume the same row and still stop at the end. |
352 | 0 | count = 0; |
353 | 0 | WriteState result = aSink->WritePixelsToRow<uint32_t>([&]{ |
354 | 0 | ++count; |
355 | 0 | return AsVariant(BGRAColor::Green().AsPixel()); |
356 | 0 | }); |
357 | 0 |
|
358 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
359 | 0 | EXPECT_EQ(50u, count); |
360 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
361 | 0 | CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, 1)); |
362 | 0 |
|
363 | 0 | return; |
364 | 0 | } |
365 | 0 | |
366 | 0 | // We should've finished the surface at this point. |
367 | 0 | AssertCorrectPipelineFinalState(aSink, |
368 | 0 | IntRect(0, 0, 100, 100), |
369 | 0 | IntRect(0, 0, 100, 100)); |
370 | 0 |
|
371 | 0 | // Attempt to write more and make sure that nothing gets written. |
372 | 0 | count = 0; |
373 | 0 | result = aSink->WritePixelsToRow<uint32_t>([&]{ |
374 | 0 | count++; |
375 | 0 | return AsVariant(BGRAColor::Red().AsPixel()); |
376 | 0 | }); |
377 | 0 |
|
378 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
379 | 0 | EXPECT_EQ(0u, count); |
380 | 0 | EXPECT_TRUE(aSink->IsSurfaceFinished()); |
381 | 0 |
|
382 | 0 | // Check that the generated image is still correct. |
383 | 0 | CheckGeneratedImage(aDecoder, IntRect(0, 0, 50, 1)); |
384 | 0 | }; |
385 | 0 |
|
386 | 0 | WithSurfaceSink<Orient::NORMAL>([&](Decoder* aDecoder, SurfaceSink* aSink) { |
387 | 0 | checkEarlyExit(aDecoder, aSink, WriteState::NEED_MORE_DATA); |
388 | 0 | }); |
389 | 0 |
|
390 | 0 | WithSurfaceSink<Orient::NORMAL>([&](Decoder* aDecoder, SurfaceSink* aSink) { |
391 | 0 | checkEarlyExit(aDecoder, aSink, WriteState::FAILURE); |
392 | 0 | }); |
393 | 0 |
|
394 | 0 | WithSurfaceSink<Orient::NORMAL>([&](Decoder* aDecoder, SurfaceSink* aSink) { |
395 | 0 | checkEarlyExit(aDecoder, aSink, WriteState::FINISHED); |
396 | 0 | }); |
397 | 0 | } |
398 | | |
399 | | TEST(ImageSurfaceSink, SurfaceSinkWriteBuffer) |
400 | 0 | { |
401 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
402 | 0 | // Create a green buffer the same size as one row of the surface (which is 100x100), |
403 | 0 | // containing 60 pixels of green in the middle and 20 transparent pixels on |
404 | 0 | // either side. |
405 | 0 | uint32_t buffer[100]; |
406 | 0 | InitializeRowBuffer(buffer, 100, 20, 80, BGRAColor::Green().AsPixel()); |
407 | 0 |
|
408 | 0 | // Write the buffer to every row of the surface and check that the generated |
409 | 0 | // image is correct. |
410 | 0 | CheckIterativeWrite(aDecoder, aSink, IntRect(20, 0, 60, 100), [&]{ |
411 | 0 | return aSink->WriteBuffer(buffer); |
412 | 0 | }); |
413 | 0 | }); |
414 | 0 | } |
415 | | |
416 | | TEST(ImageSurfaceSink, SurfaceSinkWriteBufferPartialRow) |
417 | 0 | { |
418 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
419 | 0 | // Create a buffer the same size as one row of the surface, containing all |
420 | 0 | // green pixels. |
421 | 0 | uint32_t buffer[100]; |
422 | 0 | for (int i = 0; i < 100; ++i) { |
423 | 0 | buffer[i] = BGRAColor::Green().AsPixel(); |
424 | 0 | } |
425 | 0 |
|
426 | 0 | // Write the buffer to the middle 60 pixels of every row of the surface and |
427 | 0 | // check that the generated image is correct. |
428 | 0 | CheckIterativeWrite(aDecoder, aSink, IntRect(20, 0, 60, 100), [&]{ |
429 | 0 | return aSink->WriteBuffer(buffer, 20, 60); |
430 | 0 | }); |
431 | 0 | }); |
432 | 0 | } |
433 | | |
434 | | TEST(ImageSurfaceSink, SurfaceSinkWriteBufferPartialRowStartColOverflow) |
435 | 0 | { |
436 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
437 | 0 | // Create a buffer the same size as one row of the surface, containing all |
438 | 0 | // green pixels. |
439 | 0 | uint32_t buffer[100]; |
440 | 0 | for (int i = 0; i < 100; ++i) { |
441 | 0 | buffer[i] = BGRAColor::Green().AsPixel(); |
442 | 0 | } |
443 | 0 |
|
444 | 0 | { |
445 | 0 | // Write the buffer to successive rows until every row of the surface |
446 | 0 | // has been written. We place the start column beyond the end of the row, |
447 | 0 | // which will prevent us from writing anything, so we check that the |
448 | 0 | // generated image is entirely transparent. |
449 | 0 | CheckIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), [&]{ |
450 | 0 | return aSink->WriteBuffer(buffer, 100, 100); |
451 | 0 | }); |
452 | 0 | } |
453 | 0 |
|
454 | 0 | ResetForNextPass(aSink); |
455 | 0 |
|
456 | 0 | { |
457 | 0 | // Write the buffer to successive rows until every row of the surface |
458 | 0 | // has been written. We use column 50 as the start column, but we still |
459 | 0 | // write the buffer, which means we overflow the right edge of the surface |
460 | 0 | // by 50 pixels. We check that the left half of the generated image is |
461 | 0 | // transparent and the right half is green. |
462 | 0 | CheckIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), [&]{ |
463 | 0 | return aSink->WriteBuffer(buffer, 50, 100); |
464 | 0 | }); |
465 | 0 | } |
466 | 0 | }); |
467 | 0 | } |
468 | | |
469 | | TEST(ImageSurfaceSink, SurfaceSinkWriteBufferPartialRowBufferOverflow) |
470 | 0 | { |
471 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
472 | 0 | // Create a buffer twice as large as a row of the surface. The first half |
473 | 0 | // (which is as large as a row of the image) will contain green pixels, |
474 | 0 | // while the second half will contain red pixels. |
475 | 0 | uint32_t buffer[200]; |
476 | 0 | for (int i = 0; i < 200; ++i) { |
477 | 0 | buffer[i] = i < 100 ? BGRAColor::Green().AsPixel() |
478 | 0 | : BGRAColor::Red().AsPixel(); |
479 | 0 | } |
480 | 0 |
|
481 | 0 | { |
482 | 0 | // Write the buffer to successive rows until every row of the surface has |
483 | 0 | // been written. The buffer extends 100 pixels to the right of a row of |
484 | 0 | // the surface, but bounds checking will prevent us from overflowing the |
485 | 0 | // buffer. We check that the generated image is entirely green since the |
486 | 0 | // pixels on the right side of the buffer shouldn't have been written to |
487 | 0 | // the surface. |
488 | 0 | CheckIterativeWrite(aDecoder, aSink, IntRect(0, 0, 100, 100), [&]{ |
489 | 0 | return aSink->WriteBuffer(buffer, 0, 200); |
490 | 0 | }); |
491 | 0 | } |
492 | 0 |
|
493 | 0 | ResetForNextPass(aSink); |
494 | 0 |
|
495 | 0 | { |
496 | 0 | // Write from the buffer to the middle of each row of the surface. That |
497 | 0 | // means that the left side of each row should be transparent, since we |
498 | 0 | // didn't write anything there. A buffer overflow would cause us to write |
499 | 0 | // buffer contents into the left side of each row. We check that the |
500 | 0 | // generated image is transparent on the left side and green on the right. |
501 | 0 | CheckIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), [&]{ |
502 | 0 | return aSink->WriteBuffer(buffer, 50, 200); |
503 | 0 | }); |
504 | 0 | } |
505 | 0 | }); |
506 | 0 | } |
507 | | |
508 | | TEST(ImageSurfaceSink, SurfaceSinkWriteBufferFromNullSource) |
509 | 0 | { |
510 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
511 | 0 | // Calling WriteBuffer() with a null pointer should fail without making any |
512 | 0 | // changes to the surface. |
513 | 0 | uint32_t* nullBuffer = nullptr; |
514 | 0 | WriteState result = aSink->WriteBuffer(nullBuffer); |
515 | 0 |
|
516 | 0 | EXPECT_EQ(WriteState::FAILURE, result); |
517 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
518 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
519 | 0 | EXPECT_TRUE(invalidRect.isNothing()); |
520 | 0 |
|
521 | 0 | // Check that nothing got written to the surface. |
522 | 0 | CheckGeneratedImage(aDecoder, IntRect(0, 0, 0, 0)); |
523 | 0 | }); |
524 | 0 | } |
525 | | |
526 | | TEST(ImageSurfaceSink, SurfaceSinkWriteEmptyRow) |
527 | 0 | { |
528 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
529 | 0 | { |
530 | 0 | // Write an empty row to each row of the surface. We check that the |
531 | 0 | // generated image is entirely transparent. |
532 | 0 | CheckIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), [&]{ |
533 | 0 | return aSink->WriteEmptyRow(); |
534 | 0 | }); |
535 | 0 | } |
536 | 0 |
|
537 | 0 | ResetForNextPass(aSink); |
538 | 0 |
|
539 | 0 | { |
540 | 0 | // Write a partial row before we begin calling WriteEmptyRow(). We check |
541 | 0 | // that the generated image is entirely transparent, which is to be |
542 | 0 | // expected since WriteEmptyRow() overwrites the current row even if some |
543 | 0 | // data has already been written to it. |
544 | 0 | uint32_t count = 0; |
545 | 0 | auto result = aSink->WritePixels<uint32_t>([&]() -> NextPixel<uint32_t> { |
546 | 0 | if (count == 50) { |
547 | 0 | return AsVariant(WriteState::NEED_MORE_DATA); |
548 | 0 | } |
549 | 0 | ++count; |
550 | 0 | return AsVariant(BGRAColor::Green().AsPixel()); |
551 | 0 | }); |
552 | 0 |
|
553 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
554 | 0 | EXPECT_EQ(50u, count); |
555 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
556 | 0 |
|
557 | 0 | CheckIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), [&]{ |
558 | 0 | return aSink->WriteEmptyRow(); |
559 | 0 | }); |
560 | 0 | } |
561 | 0 |
|
562 | 0 | ResetForNextPass(aSink); |
563 | 0 |
|
564 | 0 | { |
565 | 0 | // Create a buffer the same size as one row of the surface, containing all |
566 | 0 | // green pixels. |
567 | 0 | uint32_t buffer[100]; |
568 | 0 | for (int i = 0; i < 100; ++i) { |
569 | 0 | buffer[i] = BGRAColor::Green().AsPixel(); |
570 | 0 | } |
571 | 0 |
|
572 | 0 | // Write an empty row to the middle 60 rows of the surface. The first 20 |
573 | 0 | // and last 20 rows will be green. (We need to use DoCheckIterativeWrite() |
574 | 0 | // here because we need a custom function to check the output, since it |
575 | 0 | // can't be described by a simple rect.) |
576 | 0 | auto writeFunc = [&](uint32_t aRow) { |
577 | 0 | if (aRow < 20 || aRow >= 80) { |
578 | 0 | return aSink->WriteBuffer(buffer); |
579 | 0 | } else { |
580 | 0 | return aSink->WriteEmptyRow(); |
581 | 0 | } |
582 | 0 | }; |
583 | 0 |
|
584 | 0 | auto checkFunc = [&]{ |
585 | 0 | RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); |
586 | 0 | RefPtr<SourceSurface> surface = currentFrame->GetSourceSurface(); |
587 | 0 |
|
588 | 0 | EXPECT_TRUE(RowsAreSolidColor(surface, 0, 20, BGRAColor::Green())); |
589 | 0 | EXPECT_TRUE(RowsAreSolidColor(surface, 20, 60, BGRAColor::Transparent())); |
590 | 0 | EXPECT_TRUE(RowsAreSolidColor(surface, 80, 20, BGRAColor::Green())); |
591 | 0 | }; |
592 | 0 |
|
593 | 0 | DoCheckIterativeWrite(aSink, writeFunc, checkFunc); |
594 | 0 | } |
595 | 0 | }); |
596 | 0 | } |
597 | | |
598 | | TEST(ImageSurfaceSink, SurfaceSinkWriteUnsafeComputedRow) |
599 | 0 | { |
600 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
601 | 0 | // Create a green buffer the same size as one row of the surface. |
602 | 0 | uint32_t buffer[100]; |
603 | 0 | for (int i = 0; i < 100; ++i) { |
604 | 0 | buffer[i] = BGRAColor::Green().AsPixel(); |
605 | 0 | } |
606 | 0 |
|
607 | 0 | // Write the buffer to successive rows until every row of the surface |
608 | 0 | // has been written. We only write to the right half of each row, so we |
609 | 0 | // check that the left side of the generated image is transparent and the |
610 | 0 | // right side is green. |
611 | 0 | CheckIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), [&]{ |
612 | 0 | return aSink->WriteUnsafeComputedRow<uint32_t>([&](uint32_t* aRow, |
613 | 0 | uint32_t aLength) { |
614 | 0 | EXPECT_EQ(100u, aLength ); |
615 | 0 | memcpy(aRow + 50, buffer, 50 * sizeof(uint32_t)); |
616 | 0 | }); |
617 | 0 | }); |
618 | 0 | }); |
619 | 0 | } |
620 | | |
621 | | TEST(ImageSurfaceSink, SurfaceSinkWritePixelBlocks) |
622 | 0 | { |
623 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
624 | 0 | // Create a green buffer the same size as one row of the surface (which is 100x100), |
625 | 0 | // containing 60 pixels of green in the middle and 20 transparent pixels on |
626 | 0 | // either side. |
627 | 0 | uint32_t buffer[100]; |
628 | 0 | InitializeRowBuffer(buffer, 100, 20, 80, BGRAColor::Green().AsPixel()); |
629 | 0 |
|
630 | 0 | uint32_t count = 0; |
631 | 0 | WriteState result = aSink->WritePixelBlocks<uint32_t>([&](uint32_t* aBlockStart, |
632 | 0 | int32_t aLength) { |
633 | 0 | ++count; |
634 | 0 | EXPECT_EQ(int32_t(100), aLength); |
635 | 0 | memcpy(aBlockStart, buffer, 100 * sizeof(uint32_t)); |
636 | 0 | return MakeTuple(int32_t(100), Maybe<WriteState>()); |
637 | 0 | }); |
638 | 0 |
|
639 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
640 | 0 | EXPECT_EQ(100u, count); |
641 | 0 |
|
642 | 0 | AssertCorrectPipelineFinalState(aSink, |
643 | 0 | IntRect(0, 0, 100, 100), |
644 | 0 | IntRect(0, 0, 100, 100)); |
645 | 0 |
|
646 | 0 | // Check that the generated image is correct. |
647 | 0 | CheckGeneratedImage(aDecoder, IntRect(20, 0, 60, 100)); |
648 | 0 |
|
649 | 0 | // Attempt to write more and make sure that nothing gets written. |
650 | 0 | count = 0; |
651 | 0 | result = aSink->WritePixelBlocks<uint32_t>([&](uint32_t* aBlockStart, |
652 | 0 | int32_t aLength) { |
653 | 0 | count++; |
654 | 0 | for (int32_t i = 0; i < aLength; ++i) { |
655 | 0 | aBlockStart[i] = BGRAColor::Red().AsPixel(); |
656 | 0 | } |
657 | 0 | return MakeTuple(aLength, Maybe<WriteState>()); |
658 | 0 | }); |
659 | 0 |
|
660 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
661 | 0 | EXPECT_EQ(0u, count); |
662 | 0 | EXPECT_TRUE(aSink->IsSurfaceFinished()); |
663 | 0 |
|
664 | 0 | // Check that the generated image is still correct. |
665 | 0 | CheckGeneratedImage(aDecoder, IntRect(20, 0, 60, 100)); |
666 | 0 | }); |
667 | 0 | } |
668 | | |
669 | | TEST(ImageSurfaceSink, SurfaceSinkWritePixelBlocksPartialRow) |
670 | 0 | { |
671 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
672 | 0 | // Create a green buffer the same size as one row of the surface (which is 100x100), |
673 | 0 | // containing 60 pixels of green in the middle and 20 transparent pixels on |
674 | 0 | // either side. |
675 | 0 | uint32_t buffer[100]; |
676 | 0 | InitializeRowBuffer(buffer, 100, 20, 80, BGRAColor::Green().AsPixel()); |
677 | 0 |
|
678 | 0 | // Write the first 99 rows of our 100x100 surface and verify that even |
679 | 0 | // though our lambda will yield pixels forever, only one row is written per |
680 | 0 | // call to WritePixelsToRow(). |
681 | 0 | for (int row = 0; row < 99; ++row) { |
682 | 0 | for (int32_t written = 0; written < 100; ) { |
683 | 0 | WriteState result = aSink->WritePixelBlocks<uint32_t>([&](uint32_t* aBlockStart, |
684 | 0 | int32_t aLength) { |
685 | 0 | // When we write the final block of pixels, it will request we start |
686 | 0 | // another row. We should abort at that point. |
687 | 0 | if (aLength == int32_t(100) && written == int32_t(100)) { |
688 | 0 | return MakeTuple(int32_t(0), Some(WriteState::NEED_MORE_DATA)); |
689 | 0 | } |
690 | 0 | |
691 | 0 | // It should always request enough data to fill the row. So it should |
692 | 0 | // request 100, 75, 50, and finally 25 pixels. |
693 | 0 | EXPECT_EQ(int32_t(100) - written, aLength); |
694 | 0 |
|
695 | 0 | // Only write one quarter of the pixels for the row. |
696 | 0 | memcpy(aBlockStart, &buffer[written], 25 * sizeof(uint32_t)); |
697 | 0 | written += 25; |
698 | 0 |
|
699 | 0 | // We've written the last pixels remaining for the row. |
700 | 0 | if (written == int32_t(100)) { |
701 | 0 | return MakeTuple(int32_t(25), Maybe<WriteState>()); |
702 | 0 | } |
703 | 0 | |
704 | 0 | // We've written another quarter of the row but not yet all of it. |
705 | 0 | return MakeTuple(int32_t(25), Some(WriteState::NEED_MORE_DATA)); |
706 | 0 | }); |
707 | 0 |
|
708 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
709 | 0 | } |
710 | 0 |
|
711 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
712 | 0 |
|
713 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
714 | 0 | EXPECT_TRUE(invalidRect.isSome()); |
715 | 0 | EXPECT_EQ(IntRect(0, row, 100, 1), invalidRect->mInputSpaceRect); |
716 | 0 | EXPECT_EQ(IntRect(0, row, 100, 1), invalidRect->mOutputSpaceRect); |
717 | 0 |
|
718 | 0 | CheckGeneratedImage(aDecoder, IntRect(20, 0, 60, row + 1)); |
719 | 0 | } |
720 | 0 |
|
721 | 0 | // Write the final line, which should finish the surface. |
722 | 0 | uint32_t count = 0; |
723 | 0 | WriteState result = aSink->WritePixelBlocks<uint32_t>([&](uint32_t* aBlockStart, |
724 | 0 | int32_t aLength) { |
725 | 0 | ++count; |
726 | 0 | EXPECT_EQ(int32_t(100), aLength); |
727 | 0 | memcpy(aBlockStart, buffer, 100 * sizeof(uint32_t)); |
728 | 0 | return MakeTuple(int32_t(100), Maybe<WriteState>()); |
729 | 0 | }); |
730 | 0 |
|
731 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
732 | 0 | EXPECT_EQ(1u, count); |
733 | 0 |
|
734 | 0 | // Note that the final invalid rect we expect here is only the last row; |
735 | 0 | // that's because we called TakeInvalidRect() repeatedly in the loop above. |
736 | 0 | AssertCorrectPipelineFinalState(aSink, |
737 | 0 | IntRect(0, 99, 100, 1), |
738 | 0 | IntRect(0, 99, 100, 1)); |
739 | 0 |
|
740 | 0 | // Check that the generated image is correct. |
741 | 0 | CheckGeneratedImage(aDecoder, IntRect(20, 0, 60, 100)); |
742 | 0 |
|
743 | 0 | // Attempt to write more and make sure that nothing gets written. |
744 | 0 | count = 0; |
745 | 0 | result = aSink->WritePixelBlocks<uint32_t>([&](uint32_t* aBlockStart, |
746 | 0 | int32_t aLength) { |
747 | 0 | count++; |
748 | 0 | for (int32_t i = 0; i < aLength; ++i) { |
749 | 0 | aBlockStart[i] = BGRAColor::Red().AsPixel(); |
750 | 0 | } |
751 | 0 | return MakeTuple(aLength, Maybe<WriteState>()); |
752 | 0 | }); |
753 | 0 |
|
754 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
755 | 0 | EXPECT_EQ(0u, count); |
756 | 0 | EXPECT_TRUE(aSink->IsSurfaceFinished()); |
757 | 0 |
|
758 | 0 | // Check that the generated image is still correct. |
759 | 0 | CheckGeneratedImage(aDecoder, IntRect(20, 0, 60, 100)); |
760 | 0 | }); |
761 | 0 | } |
762 | | |
763 | | TEST(ImageSurfaceSink, SurfaceSinkProgressivePasses) |
764 | 0 | { |
765 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
766 | 0 | { |
767 | 0 | // Fill the image with a first pass of red. |
768 | 0 | uint32_t count = 0; |
769 | 0 | auto result = aSink->WritePixels<uint32_t>([&]() { |
770 | 0 | ++count; |
771 | 0 | return AsVariant(BGRAColor::Red().AsPixel()); |
772 | 0 | }); |
773 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
774 | 0 | EXPECT_EQ(100u * 100u, count); |
775 | 0 |
|
776 | 0 | AssertCorrectPipelineFinalState(aSink, |
777 | 0 | IntRect(0, 0, 100, 100), |
778 | 0 | IntRect(0, 0, 100, 100)); |
779 | 0 |
|
780 | 0 | // Check that the generated image is correct. |
781 | 0 | RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); |
782 | 0 | RefPtr<SourceSurface> surface = currentFrame->GetSourceSurface(); |
783 | 0 | EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Red())); |
784 | 0 | } |
785 | 0 |
|
786 | 0 | { |
787 | 0 | ResetForNextPass(aSink); |
788 | 0 |
|
789 | 0 | // Check that the generated image is still the first pass image. |
790 | 0 | RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); |
791 | 0 | RefPtr<SourceSurface> surface = currentFrame->GetSourceSurface(); |
792 | 0 | EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Red())); |
793 | 0 | } |
794 | 0 |
|
795 | 0 | { |
796 | 0 | // Fill the image with a second pass of green. |
797 | 0 | uint32_t count = 0; |
798 | 0 | auto result = aSink->WritePixels<uint32_t>([&]() { |
799 | 0 | ++count; |
800 | 0 | return AsVariant(BGRAColor::Green().AsPixel()); |
801 | 0 | }); |
802 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
803 | 0 | EXPECT_EQ(100u * 100u, count); |
804 | 0 |
|
805 | 0 | AssertCorrectPipelineFinalState(aSink, |
806 | 0 | IntRect(0, 0, 100, 100), |
807 | 0 | IntRect(0, 0, 100, 100)); |
808 | 0 |
|
809 | 0 | // Check that the generated image is correct. |
810 | 0 | RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); |
811 | 0 | RefPtr<SourceSurface> surface = currentFrame->GetSourceSurface(); |
812 | 0 | EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Green())); |
813 | 0 | } |
814 | 0 | }); |
815 | 0 | } |
816 | | |
817 | | TEST(ImageSurfaceSink, SurfaceSinkInvalidRect) |
818 | 0 | { |
819 | 0 | WithSurfaceSink<Orient::NORMAL>([](Decoder* aDecoder, SurfaceSink* aSink) { |
820 | 0 | { |
821 | 0 | // Write one row. |
822 | 0 | uint32_t count = 0; |
823 | 0 | auto result = aSink->WritePixels<uint32_t>([&]() -> NextPixel<uint32_t> { |
824 | 0 | if (count == 100) { |
825 | 0 | return AsVariant(WriteState::NEED_MORE_DATA); |
826 | 0 | } |
827 | 0 | count++; |
828 | 0 | return AsVariant(BGRAColor::Green().AsPixel()); |
829 | 0 | }); |
830 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
831 | 0 | EXPECT_EQ(100u, count); |
832 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
833 | 0 |
|
834 | 0 | // Assert that we have the right invalid rect. |
835 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
836 | 0 | EXPECT_TRUE(invalidRect.isSome()); |
837 | 0 | EXPECT_EQ(IntRect(0, 0, 100, 1), invalidRect->mInputSpaceRect); |
838 | 0 | EXPECT_EQ(IntRect(0, 0, 100, 1), invalidRect->mOutputSpaceRect); |
839 | 0 | } |
840 | 0 |
|
841 | 0 | { |
842 | 0 | // Write eight rows. |
843 | 0 | uint32_t count = 0; |
844 | 0 | auto result = aSink->WritePixels<uint32_t>([&]() -> NextPixel<uint32_t> { |
845 | 0 | if (count == 100 * 8) { |
846 | 0 | return AsVariant(WriteState::NEED_MORE_DATA); |
847 | 0 | } |
848 | 0 | count++; |
849 | 0 | return AsVariant(BGRAColor::Green().AsPixel()); |
850 | 0 | }); |
851 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
852 | 0 | EXPECT_EQ(100u * 8u, count); |
853 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
854 | 0 |
|
855 | 0 | // Assert that we have the right invalid rect. |
856 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
857 | 0 | EXPECT_TRUE(invalidRect.isSome()); |
858 | 0 | EXPECT_EQ(IntRect(0, 1, 100, 8), invalidRect->mInputSpaceRect); |
859 | 0 | EXPECT_EQ(IntRect(0, 1, 100, 8), invalidRect->mOutputSpaceRect); |
860 | 0 | } |
861 | 0 |
|
862 | 0 | { |
863 | 0 | // Write the left half of one row. |
864 | 0 | uint32_t count = 0; |
865 | 0 | auto result = aSink->WritePixels<uint32_t>([&]() -> NextPixel<uint32_t> { |
866 | 0 | if (count == 50) { |
867 | 0 | return AsVariant(WriteState::NEED_MORE_DATA); |
868 | 0 | } |
869 | 0 | count++; |
870 | 0 | return AsVariant(BGRAColor::Green().AsPixel()); |
871 | 0 | }); |
872 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
873 | 0 | EXPECT_EQ(50u, count); |
874 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
875 | 0 |
|
876 | 0 | // Assert that we don't have an invalid rect, since the invalid rect only |
877 | 0 | // gets updated when a row gets completed. |
878 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
879 | 0 | EXPECT_TRUE(invalidRect.isNothing()); |
880 | 0 | } |
881 | 0 |
|
882 | 0 | { |
883 | 0 | // Write the right half of the same row. |
884 | 0 | uint32_t count = 0; |
885 | 0 | auto result = aSink->WritePixels<uint32_t>([&]() -> NextPixel<uint32_t> { |
886 | 0 | if (count == 50) { |
887 | 0 | return AsVariant(WriteState::NEED_MORE_DATA); |
888 | 0 | } |
889 | 0 | count++; |
890 | 0 | return AsVariant(BGRAColor::Green().AsPixel()); |
891 | 0 | }); |
892 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
893 | 0 | EXPECT_EQ(50u, count); |
894 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
895 | 0 |
|
896 | 0 | // Assert that we have the right invalid rect, which will include both the |
897 | 0 | // left and right halves of this row now that we've completed it. |
898 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
899 | 0 | EXPECT_TRUE(invalidRect.isSome()); |
900 | 0 | EXPECT_EQ(IntRect(0, 9, 100, 1), invalidRect->mInputSpaceRect); |
901 | 0 | EXPECT_EQ(IntRect(0, 9, 100, 1), invalidRect->mOutputSpaceRect); |
902 | 0 | } |
903 | 0 |
|
904 | 0 | { |
905 | 0 | // Write no rows. |
906 | 0 | auto result = aSink->WritePixels<uint32_t>([&]() { |
907 | 0 | return AsVariant(WriteState::NEED_MORE_DATA); |
908 | 0 | }); |
909 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
910 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
911 | 0 |
|
912 | 0 | // Assert that we don't have an invalid rect. |
913 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
914 | 0 | EXPECT_TRUE(invalidRect.isNothing()); |
915 | 0 | } |
916 | 0 |
|
917 | 0 | { |
918 | 0 | // Fill the rest of the image. |
919 | 0 | uint32_t count = 0; |
920 | 0 | auto result = aSink->WritePixels<uint32_t>([&]() { |
921 | 0 | count++; |
922 | 0 | return AsVariant(BGRAColor::Green().AsPixel()); |
923 | 0 | }); |
924 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
925 | 0 | EXPECT_EQ(100u * 90u, count); |
926 | 0 | EXPECT_TRUE(aSink->IsSurfaceFinished()); |
927 | 0 |
|
928 | 0 | // Assert that we have the right invalid rect. |
929 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
930 | 0 | EXPECT_TRUE(invalidRect.isSome()); |
931 | 0 | EXPECT_EQ(IntRect(0, 10, 100, 90), invalidRect->mInputSpaceRect); |
932 | 0 | EXPECT_EQ(IntRect(0, 10, 100, 90), invalidRect->mOutputSpaceRect); |
933 | 0 |
|
934 | 0 | // Check that the generated image is correct. |
935 | 0 | RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); |
936 | 0 | RefPtr<SourceSurface> surface = currentFrame->GetSourceSurface(); |
937 | 0 | EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Green())); |
938 | 0 | } |
939 | 0 | }); |
940 | 0 | } |
941 | | |
942 | | TEST(ImageSurfaceSink, SurfaceSinkFlipVertically) |
943 | 0 | { |
944 | 0 | WithSurfaceSink<Orient::FLIP_VERTICALLY>([](Decoder* aDecoder, |
945 | 0 | SurfaceSink* aSink) { |
946 | 0 | { |
947 | 0 | // Fill the image with a first pass of red. |
948 | 0 | uint32_t count = 0; |
949 | 0 | auto result = aSink->WritePixels<uint32_t>([&]() { |
950 | 0 | ++count; |
951 | 0 | return AsVariant(BGRAColor::Red().AsPixel()); |
952 | 0 | }); |
953 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
954 | 0 | EXPECT_EQ(100u * 100u, count); |
955 | 0 |
|
956 | 0 | AssertCorrectPipelineFinalState(aSink, |
957 | 0 | IntRect(0, 0, 100, 100), |
958 | 0 | IntRect(0, 0, 100, 100)); |
959 | 0 |
|
960 | 0 | // Check that the generated image is correct. |
961 | 0 | RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); |
962 | 0 | RefPtr<SourceSurface> surface = currentFrame->GetSourceSurface(); |
963 | 0 | EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Red())); |
964 | 0 | } |
965 | 0 |
|
966 | 0 | { |
967 | 0 | ResetForNextPass(aSink); |
968 | 0 |
|
969 | 0 | // Check that the generated image is still the first pass image. |
970 | 0 | RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); |
971 | 0 | RefPtr<SourceSurface> surface = currentFrame->GetSourceSurface(); |
972 | 0 | EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Red())); |
973 | 0 | } |
974 | 0 |
|
975 | 0 | { |
976 | 0 | // Fill 25 rows of the image with green and make sure everything is OK. |
977 | 0 | uint32_t count = 0; |
978 | 0 | auto result = aSink->WritePixels<uint32_t>([&]() -> NextPixel<uint32_t> { |
979 | 0 | if (count == 25 * 100) { |
980 | 0 | return AsVariant(WriteState::NEED_MORE_DATA); |
981 | 0 | } |
982 | 0 | count++; |
983 | 0 | return AsVariant(BGRAColor::Green().AsPixel()); |
984 | 0 | }); |
985 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
986 | 0 | EXPECT_EQ(25u * 100u, count); |
987 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
988 | 0 |
|
989 | 0 | // Assert that we have the right invalid rect, which should include the |
990 | 0 | // *bottom* (since we're flipping vertically) 25 rows of the image. |
991 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
992 | 0 | EXPECT_TRUE(invalidRect.isSome()); |
993 | 0 | EXPECT_EQ(IntRect(0, 75, 100, 25), invalidRect->mInputSpaceRect); |
994 | 0 | EXPECT_EQ(IntRect(0, 75, 100, 25), invalidRect->mOutputSpaceRect); |
995 | 0 |
|
996 | 0 | // Check that the generated image is correct. |
997 | 0 | RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); |
998 | 0 | RefPtr<SourceSurface> surface = currentFrame->GetSourceSurface(); |
999 | 0 | EXPECT_TRUE(RowsAreSolidColor(surface, 0, 75, BGRAColor::Red())); |
1000 | 0 | EXPECT_TRUE(RowsAreSolidColor(surface, 75, 25, BGRAColor::Green())); |
1001 | 0 | } |
1002 | 0 |
|
1003 | 0 | { |
1004 | 0 | // Fill the rest of the image with a second pass of green. |
1005 | 0 | uint32_t count = 0; |
1006 | 0 | auto result = aSink->WritePixels<uint32_t>([&]() { |
1007 | 0 | ++count; |
1008 | 0 | return AsVariant(BGRAColor::Green().AsPixel()); |
1009 | 0 | }); |
1010 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
1011 | 0 | EXPECT_EQ(75u * 100u, count); |
1012 | 0 |
|
1013 | 0 | AssertCorrectPipelineFinalState(aSink, |
1014 | 0 | IntRect(0, 0, 100, 75), |
1015 | 0 | IntRect(0, 0, 100, 75)); |
1016 | 0 |
|
1017 | 0 | // Check that the generated image is correct. |
1018 | 0 | RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); |
1019 | 0 | RefPtr<SourceSurface> surface = currentFrame->GetSourceSurface(); |
1020 | 0 | EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Green())); |
1021 | 0 | } |
1022 | 0 | }); |
1023 | 0 | } |
1024 | | |
1025 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkInitialization) |
1026 | 0 | { |
1027 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1028 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1029 | 0 | // Check initial state. |
1030 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
1031 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
1032 | 0 | EXPECT_TRUE(invalidRect.isNothing()); |
1033 | 0 |
|
1034 | 0 | // Check that the paletted image data is zero-initialized. |
1035 | 0 | RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); |
1036 | 0 | uint8_t* imageData = nullptr; |
1037 | 0 | uint32_t imageLength = 0; |
1038 | 0 | currentFrame->GetImageData(&imageData, &imageLength); |
1039 | 0 | ASSERT_TRUE(imageData != nullptr); |
1040 | 0 | ASSERT_EQ(100u * 100u, imageLength); |
1041 | 0 | for (uint32_t i = 0; i < imageLength; ++i) { |
1042 | 0 | ASSERT_EQ(uint8_t(0), imageData[i]); |
1043 | 0 | } |
1044 | 0 | }); |
1045 | 0 | } |
1046 | | |
1047 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsFor0_0_100_100) |
1048 | 0 | { |
1049 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1050 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1051 | 0 | CheckPalettedWritePixels(aDecoder, aSink); |
1052 | 0 | }); |
1053 | 0 | } |
1054 | | |
1055 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsFor25_25_50_50) |
1056 | 0 | { |
1057 | 0 | WithPalettedSurfaceSink(IntRect(25, 25, 50, 50), |
1058 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1059 | 0 | CheckPalettedWritePixels(aDecoder, aSink, |
1060 | 0 | /* aOutputRect = */ Some(IntRect(0, 0, 50, 50)), |
1061 | 0 | /* aInputRect = */ Some(IntRect(0, 0, 50, 50)), |
1062 | 0 | /* aInputWriteRect = */ Some(IntRect(25, 25, 50, 50)), |
1063 | 0 | /* aOutputWriteRect = */ Some(IntRect(25, 25, 50, 50))); |
1064 | 0 | }); |
1065 | 0 | } |
1066 | | |
1067 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsForMinus25_Minus25_50_50) |
1068 | 0 | { |
1069 | 0 | WithPalettedSurfaceSink(IntRect(-25, -25, 50, 50), |
1070 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1071 | 0 | CheckPalettedWritePixels(aDecoder, aSink, |
1072 | 0 | /* aOutputRect = */ Some(IntRect(0, 0, 50, 50)), |
1073 | 0 | /* aInputRect = */ Some(IntRect(0, 0, 50, 50)), |
1074 | 0 | /* aInputWriteRect = */ Some(IntRect(-25, -25, 50, 50)), |
1075 | 0 | /* aOutputWriteRect = */ Some(IntRect(-25, -25, 50, 50))); |
1076 | 0 | }); |
1077 | 0 | } |
1078 | | |
1079 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsFor75_Minus25_50_50) |
1080 | 0 | { |
1081 | 0 | WithPalettedSurfaceSink(IntRect(75, -25, 50, 50), |
1082 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1083 | 0 | CheckPalettedWritePixels(aDecoder, aSink, |
1084 | 0 | /* aOutputRect = */ Some(IntRect(0, 0, 50, 50)), |
1085 | 0 | /* aInputRect = */ Some(IntRect(0, 0, 50, 50)), |
1086 | 0 | /* aInputWriteRect = */ Some(IntRect(75, -25, 50, 50)), |
1087 | 0 | /* aOutputWriteRect = */ Some(IntRect(75, -25, 50, 50))); |
1088 | 0 | }); |
1089 | 0 | } |
1090 | | |
1091 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsForMinus25_75_50_50) |
1092 | 0 | { |
1093 | 0 | WithPalettedSurfaceSink(IntRect(-25, 75, 50, 50), |
1094 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1095 | 0 | CheckPalettedWritePixels(aDecoder, aSink, |
1096 | 0 | /* aOutputRect = */ Some(IntRect(0, 0, 50, 50)), |
1097 | 0 | /* aInputRect = */ Some(IntRect(0, 0, 50, 50)), |
1098 | 0 | /* aInputWriteRect = */ Some(IntRect(-25, 75, 50, 50)), |
1099 | 0 | /* aOutputWriteRect = */ Some(IntRect(-25, 75, 50, 50))); |
1100 | 0 | }); |
1101 | 0 | } |
1102 | | |
1103 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsFor75_75_50_50) |
1104 | 0 | { |
1105 | 0 | WithPalettedSurfaceSink(IntRect(75, 75, 50, 50), |
1106 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1107 | 0 | CheckPalettedWritePixels(aDecoder, aSink, |
1108 | 0 | /* aOutputRect = */ Some(IntRect(0, 0, 50, 50)), |
1109 | 0 | /* aInputRect = */ Some(IntRect(0, 0, 50, 50)), |
1110 | 0 | /* aInputWriteRect = */ Some(IntRect(75, 75, 50, 50)), |
1111 | 0 | /* aOutputWriteRect = */ Some(IntRect(75, 75, 50, 50))); |
1112 | 0 | }); |
1113 | 0 | } |
1114 | | |
1115 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsFinish) |
1116 | 0 | { |
1117 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1118 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1119 | 0 | // Write nothing into the surface; just finish immediately. |
1120 | 0 | uint32_t count = 0; |
1121 | 0 | auto result = aSink->WritePixels<uint8_t>([&]{ |
1122 | 0 | count++; |
1123 | 0 | return AsVariant(WriteState::FINISHED); |
1124 | 0 | }); |
1125 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
1126 | 0 | EXPECT_EQ(1u, count); |
1127 | 0 |
|
1128 | 0 | AssertCorrectPipelineFinalState(aSink, |
1129 | 0 | IntRect(0, 0, 100, 100), |
1130 | 0 | IntRect(0, 0, 100, 100)); |
1131 | 0 |
|
1132 | 0 | // Attempt to write more and make sure that nothing gets written. |
1133 | 0 | count = 0; |
1134 | 0 | result = aSink->WritePixels<uint8_t>([&]() { |
1135 | 0 | count++; |
1136 | 0 | return AsVariant(uint8_t(128)); |
1137 | 0 | }); |
1138 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
1139 | 0 | EXPECT_EQ(0u, count); |
1140 | 0 | EXPECT_TRUE(aSink->IsSurfaceFinished()); |
1141 | 0 |
|
1142 | 0 | // Check that the generated image is correct. |
1143 | 0 | EXPECT_TRUE(IsSolidPalettedColor(aDecoder, 0)); |
1144 | 0 | }); |
1145 | 0 | } |
1146 | | |
1147 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsEarlyExit) |
1148 | 0 | { |
1149 | 0 | auto checkEarlyExit = |
1150 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink, WriteState aState) { |
1151 | 0 | // Write half a row of green pixels and then exit early with |aState|. If |
1152 | 0 | // the lambda keeps getting called, we'll write red pixels, which will cause |
1153 | 0 | // the test to fail. |
1154 | 0 | uint32_t count = 0; |
1155 | 0 | auto result = aSink->WritePixels<uint8_t>([&]() -> NextPixel<uint8_t> { |
1156 | 0 | if (count == 50) { |
1157 | 0 | return AsVariant(aState); |
1158 | 0 | } |
1159 | 0 | return count++ < 50 ? AsVariant(uint8_t(255)) : AsVariant(uint8_t(128)); |
1160 | 0 | }); |
1161 | 0 |
|
1162 | 0 | EXPECT_EQ(aState, result); |
1163 | 0 | EXPECT_EQ(50u, count); |
1164 | 0 | CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 50, 1)); |
1165 | 0 |
|
1166 | 0 | if (aState != WriteState::FINISHED) { |
1167 | 0 | // We should still be able to write more at this point. |
1168 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
1169 | 0 |
|
1170 | 0 | // Verify that we can resume writing. We'll finish up the same row. |
1171 | 0 | count = 0; |
1172 | 0 | result = aSink->WritePixels<uint8_t>([&]() -> NextPixel<uint8_t> { |
1173 | 0 | if (count == 50) { |
1174 | 0 | return AsVariant(WriteState::NEED_MORE_DATA); |
1175 | 0 | } |
1176 | 0 | ++count; |
1177 | 0 | return AsVariant(uint8_t(255)); |
1178 | 0 | }); |
1179 | 0 |
|
1180 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
1181 | 0 | EXPECT_EQ(50u, count); |
1182 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
1183 | 0 | CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 100, 1)); |
1184 | 0 |
|
1185 | 0 | return; |
1186 | 0 | } |
1187 | 0 | |
1188 | 0 | // We should've finished the surface at this point. |
1189 | 0 | AssertCorrectPipelineFinalState(aSink, |
1190 | 0 | IntRect(0, 0, 100, 100), |
1191 | 0 | IntRect(0, 0, 100, 100)); |
1192 | 0 |
|
1193 | 0 | // Attempt to write more and make sure that nothing gets written. |
1194 | 0 | count = 0; |
1195 | 0 | result = aSink->WritePixels<uint8_t>([&]{ |
1196 | 0 | count++; |
1197 | 0 | return AsVariant(uint8_t(128)); |
1198 | 0 | }); |
1199 | 0 |
|
1200 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
1201 | 0 | EXPECT_EQ(0u, count); |
1202 | 0 | EXPECT_TRUE(aSink->IsSurfaceFinished()); |
1203 | 0 |
|
1204 | 0 | // Check that the generated image is still correct. |
1205 | 0 | CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 50, 1)); |
1206 | 0 | }; |
1207 | 0 |
|
1208 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1209 | 0 | [&](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1210 | 0 | checkEarlyExit(aDecoder, aSink, WriteState::NEED_MORE_DATA); |
1211 | 0 | }); |
1212 | 0 |
|
1213 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1214 | 0 | [&](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1215 | 0 | checkEarlyExit(aDecoder, aSink, WriteState::FAILURE); |
1216 | 0 | }); |
1217 | 0 |
|
1218 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1219 | 0 | [&](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1220 | 0 | checkEarlyExit(aDecoder, aSink, WriteState::FINISHED); |
1221 | 0 | }); |
1222 | 0 | } |
1223 | | |
1224 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsToRow) |
1225 | 0 | { |
1226 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1227 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1228 | 0 | // Write the first 99 rows of our 100x100 surface and verify that even |
1229 | 0 | // though our lambda will yield pixels forever, only one row is written per |
1230 | 0 | // call to WritePixelsToRow(). |
1231 | 0 | for (int row = 0; row < 99; ++row) { |
1232 | 0 | uint32_t count = 0; |
1233 | 0 | WriteState result = aSink->WritePixelsToRow<uint8_t>([&]{ |
1234 | 0 | ++count; |
1235 | 0 | return AsVariant(uint8_t(255)); |
1236 | 0 | }); |
1237 | 0 |
|
1238 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
1239 | 0 | EXPECT_EQ(100u, count); |
1240 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
1241 | 0 |
|
1242 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
1243 | 0 | EXPECT_TRUE(invalidRect.isSome()); |
1244 | 0 | EXPECT_EQ(IntRect(0, row, 100, 1), invalidRect->mInputSpaceRect); |
1245 | 0 | EXPECT_EQ(IntRect(0, row, 100, 1), invalidRect->mOutputSpaceRect); |
1246 | 0 |
|
1247 | 0 | CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 100, row + 1)); |
1248 | 0 | } |
1249 | 0 |
|
1250 | 0 | // Write the final line, which should finish the surface. |
1251 | 0 | uint32_t count = 0; |
1252 | 0 | WriteState result = aSink->WritePixelsToRow<uint8_t>([&]{ |
1253 | 0 | ++count; |
1254 | 0 | return AsVariant(uint8_t(255)); |
1255 | 0 | }); |
1256 | 0 |
|
1257 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
1258 | 0 | EXPECT_EQ(100u, count); |
1259 | 0 |
|
1260 | 0 | // Note that the final invalid rect we expect here is only the last row; |
1261 | 0 | // that's because we called TakeInvalidRect() repeatedly in the loop above. |
1262 | 0 | AssertCorrectPipelineFinalState(aSink, |
1263 | 0 | IntRect(0, 99, 100, 1), |
1264 | 0 | IntRect(0, 99, 100, 1)); |
1265 | 0 |
|
1266 | 0 | // Check that the generated image is correct. |
1267 | 0 | CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 100, 100)); |
1268 | 0 |
|
1269 | 0 | // Attempt to write more and make sure that nothing gets written. |
1270 | 0 | count = 0; |
1271 | 0 | result = aSink->WritePixelsToRow<uint8_t>([&]{ |
1272 | 0 | count++; |
1273 | 0 | return AsVariant(uint8_t(128)); |
1274 | 0 | }); |
1275 | 0 |
|
1276 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
1277 | 0 | EXPECT_EQ(0u, count); |
1278 | 0 | EXPECT_TRUE(aSink->IsSurfaceFinished()); |
1279 | 0 |
|
1280 | 0 | // Check that the generated image is still correct. |
1281 | 0 | CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 100, 100)); |
1282 | 0 | }); |
1283 | 0 | } |
1284 | | |
1285 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWritePixelsToRowEarlyExit) |
1286 | 0 | { |
1287 | 0 | auto checkEarlyExit = |
1288 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink, WriteState aState) { |
1289 | 0 | // Write half a row of 255s and then exit early with |aState|. If the lambda |
1290 | 0 | // keeps getting called, we'll write 128s, which will cause the test to |
1291 | 0 | // fail. |
1292 | 0 | uint32_t count = 0; |
1293 | 0 | auto result = aSink->WritePixelsToRow<uint8_t>([&]() -> NextPixel<uint8_t> { |
1294 | 0 | if (count == 50) { |
1295 | 0 | return AsVariant(aState); |
1296 | 0 | } |
1297 | 0 | return count++ < 50 ? AsVariant(uint8_t(255)) |
1298 | 0 | : AsVariant(uint8_t(128)); |
1299 | 0 | }); |
1300 | 0 |
|
1301 | 0 | EXPECT_EQ(aState, result); |
1302 | 0 | EXPECT_EQ(50u, count); |
1303 | 0 | CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 50, 1)); |
1304 | 0 |
|
1305 | 0 | if (aState != WriteState::FINISHED) { |
1306 | 0 | // We should still be able to write more at this point. |
1307 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
1308 | 0 |
|
1309 | 0 | // Verify that we can resume the same row and still stop at the end. |
1310 | 0 | count = 0; |
1311 | 0 | WriteState result = aSink->WritePixelsToRow<uint8_t>([&]{ |
1312 | 0 | ++count; |
1313 | 0 | return AsVariant(uint8_t(255)); |
1314 | 0 | }); |
1315 | 0 |
|
1316 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
1317 | 0 | EXPECT_EQ(50u, count); |
1318 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
1319 | 0 | CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 100, 1)); |
1320 | 0 |
|
1321 | 0 | return; |
1322 | 0 | } |
1323 | 0 | |
1324 | 0 | // We should've finished the surface at this point. |
1325 | 0 | AssertCorrectPipelineFinalState(aSink, |
1326 | 0 | IntRect(0, 0, 100, 100), |
1327 | 0 | IntRect(0, 0, 100, 100)); |
1328 | 0 |
|
1329 | 0 | // Attempt to write more and make sure that nothing gets written. |
1330 | 0 | count = 0; |
1331 | 0 | result = aSink->WritePixelsToRow<uint8_t>([&]{ |
1332 | 0 | count++; |
1333 | 0 | return AsVariant(uint8_t(128)); |
1334 | 0 | }); |
1335 | 0 |
|
1336 | 0 | EXPECT_EQ(WriteState::FINISHED, result); |
1337 | 0 | EXPECT_EQ(0u, count); |
1338 | 0 | EXPECT_TRUE(aSink->IsSurfaceFinished()); |
1339 | 0 |
|
1340 | 0 | // Check that the generated image is still correct. |
1341 | 0 | CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 50, 1)); |
1342 | 0 | }; |
1343 | 0 |
|
1344 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1345 | 0 | [&](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1346 | 0 | checkEarlyExit(aDecoder, aSink, WriteState::NEED_MORE_DATA); |
1347 | 0 | }); |
1348 | 0 |
|
1349 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1350 | 0 | [&](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1351 | 0 | checkEarlyExit(aDecoder, aSink, WriteState::FAILURE); |
1352 | 0 | }); |
1353 | 0 |
|
1354 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1355 | 0 | [&](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1356 | 0 | checkEarlyExit(aDecoder, aSink, WriteState::FINISHED); |
1357 | 0 | }); |
1358 | 0 | } |
1359 | | |
1360 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWriteBuffer) |
1361 | 0 | { |
1362 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1363 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1364 | 0 | // Create a buffer the same size as one row of the surface (which is 100x100), |
1365 | 0 | // containing 60 pixels of 255 in the middle and 20 transparent pixels of 0 on |
1366 | 0 | // either side. |
1367 | 0 | uint8_t buffer[100]; |
1368 | 0 | for (int i = 0; i < 100; ++i) { |
1369 | 0 | buffer[i] = 20 <= i && i < 80 ? 255 : 0; |
1370 | 0 | } |
1371 | 0 |
|
1372 | 0 | // Write the buffer to every row of the surface and check that the generated |
1373 | 0 | // image is correct. |
1374 | 0 | CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(20, 0, 60, 100), [&]{ |
1375 | 0 | return aSink->WriteBuffer(buffer); |
1376 | 0 | }); |
1377 | 0 | }); |
1378 | 0 | } |
1379 | | |
1380 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWriteBufferPartialRow) |
1381 | 0 | { |
1382 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1383 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1384 | 0 | // Create a buffer the same size as one row of the surface, containing all |
1385 | 0 | // 255 pixels. |
1386 | 0 | uint8_t buffer[100]; |
1387 | 0 | for (int i = 0; i < 100; ++i) { |
1388 | 0 | buffer[i] = 255; |
1389 | 0 | } |
1390 | 0 |
|
1391 | 0 | // Write the buffer to the middle 60 pixels of every row of the surface and |
1392 | 0 | // check that the generated image is correct. |
1393 | 0 | CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(20, 0, 60, 100), [&]{ |
1394 | 0 | return aSink->WriteBuffer(buffer, 20, 60); |
1395 | 0 | }); |
1396 | 0 | }); |
1397 | 0 | } |
1398 | | |
1399 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWriteBufferPartialRowStartColOverflow) |
1400 | 0 | { |
1401 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1402 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1403 | 0 | // Create a buffer the same size as one row of the surface, containing all |
1404 | 0 | // 255 pixels. |
1405 | 0 | uint8_t buffer[100]; |
1406 | 0 | for (int i = 0; i < 100; ++i) { |
1407 | 0 | buffer[i] = 255; |
1408 | 0 | } |
1409 | 0 |
|
1410 | 0 | { |
1411 | 0 | // Write the buffer to successive rows until every row of the surface |
1412 | 0 | // has been written. We place the start column beyond the end of the row, |
1413 | 0 | // which will prevent us from writing anything, so we check that the |
1414 | 0 | // generated image is entirely 0. |
1415 | 0 | CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), [&]{ |
1416 | 0 | return aSink->WriteBuffer(buffer, 100, 100); |
1417 | 0 | }); |
1418 | 0 | } |
1419 | 0 |
|
1420 | 0 | ResetForNextPass(aSink); |
1421 | 0 |
|
1422 | 0 | { |
1423 | 0 | // Write the buffer to successive rows until every row of the surface |
1424 | 0 | // has been written. We use column 50 as the start column, but we still |
1425 | 0 | // write the buffer, which means we overflow the right edge of the surface |
1426 | 0 | // by 50 pixels. We check that the left half of the generated image is |
1427 | 0 | // 0 and the right half is 255. |
1428 | 0 | CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), [&]{ |
1429 | 0 | return aSink->WriteBuffer(buffer, 50, 100); |
1430 | 0 | }); |
1431 | 0 | } |
1432 | 0 | }); |
1433 | 0 | } |
1434 | | |
1435 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWriteBufferPartialRowBufferOverflow) |
1436 | 0 | { |
1437 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1438 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1439 | 0 | // Create a buffer twice as large as a row of the surface. The first half |
1440 | 0 | // (which is as large as a row of the image) will contain 255 pixels, |
1441 | 0 | // while the second half will contain 128 pixels. |
1442 | 0 | uint8_t buffer[200]; |
1443 | 0 | for (int i = 0; i < 200; ++i) { |
1444 | 0 | buffer[i] = i < 100 ? 255 : 128; |
1445 | 0 | } |
1446 | 0 |
|
1447 | 0 | { |
1448 | 0 | // Write the buffer to successive rows until every row of the surface has |
1449 | 0 | // been written. The buffer extends 100 pixels to the right of a row of |
1450 | 0 | // the surface, but bounds checking will prevent us from overflowing the |
1451 | 0 | // buffer. We check that the generated image is entirely 255 since the |
1452 | 0 | // pixels on the right side of the buffer shouldn't have been written to |
1453 | 0 | // the surface. |
1454 | 0 | CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(0, 0, 100, 100), [&]{ |
1455 | 0 | return aSink->WriteBuffer(buffer, 0, 200); |
1456 | 0 | }); |
1457 | 0 | } |
1458 | 0 |
|
1459 | 0 | ResetForNextPass(aSink); |
1460 | 0 |
|
1461 | 0 | { |
1462 | 0 | // Write from the buffer to the middle of each row of the surface. That |
1463 | 0 | // means that the left side of each row should be 0, since we didn't write |
1464 | 0 | // anything there. A buffer overflow would cause us to write buffer |
1465 | 0 | // contents into the left side of each row. We check that the generated |
1466 | 0 | // image is 0 on the left side and 255 on the right. |
1467 | 0 | CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), [&]{ |
1468 | 0 | return aSink->WriteBuffer(buffer, 50, 200); |
1469 | 0 | }); |
1470 | 0 | } |
1471 | 0 | }); |
1472 | 0 | } |
1473 | | |
1474 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWriteBufferFromNullSource) |
1475 | 0 | { |
1476 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1477 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1478 | 0 | // Calling WriteBuffer() with a null pointer should fail without making any |
1479 | 0 | // changes to the surface. |
1480 | 0 | uint8_t* nullBuffer = nullptr; |
1481 | 0 | WriteState result = aSink->WriteBuffer(nullBuffer); |
1482 | 0 |
|
1483 | 0 | EXPECT_EQ(WriteState::FAILURE, result); |
1484 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
1485 | 0 | Maybe<SurfaceInvalidRect> invalidRect = aSink->TakeInvalidRect(); |
1486 | 0 | EXPECT_TRUE(invalidRect.isNothing()); |
1487 | 0 |
|
1488 | 0 | // Check that nothing got written to the surface. |
1489 | 0 | CheckGeneratedPalettedImage(aDecoder, IntRect(0, 0, 0, 0)); |
1490 | 0 | }); |
1491 | 0 | } |
1492 | | |
1493 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWriteEmptyRow) |
1494 | 0 | { |
1495 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1496 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1497 | 0 | { |
1498 | 0 | // Write an empty row to each row of the surface. We check that the |
1499 | 0 | // generated image is entirely 0. |
1500 | 0 | CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), [&]{ |
1501 | 0 | return aSink->WriteEmptyRow(); |
1502 | 0 | }); |
1503 | 0 | } |
1504 | 0 |
|
1505 | 0 | ResetForNextPass(aSink); |
1506 | 0 |
|
1507 | 0 | { |
1508 | 0 | // Write a partial row before we begin calling WriteEmptyRow(). We check |
1509 | 0 | // that the generated image is entirely 0, which is to be expected since |
1510 | 0 | // WriteEmptyRow() overwrites the current row even if some data has |
1511 | 0 | // already been written to it. |
1512 | 0 | uint32_t count = 0; |
1513 | 0 | auto result = aSink->WritePixels<uint8_t>([&]() -> NextPixel<uint8_t> { |
1514 | 0 | if (count == 50) { |
1515 | 0 | return AsVariant(WriteState::NEED_MORE_DATA); |
1516 | 0 | } |
1517 | 0 | ++count; |
1518 | 0 | return AsVariant(uint8_t(255)); |
1519 | 0 | }); |
1520 | 0 |
|
1521 | 0 | EXPECT_EQ(WriteState::NEED_MORE_DATA, result); |
1522 | 0 | EXPECT_EQ(50u, count); |
1523 | 0 | EXPECT_FALSE(aSink->IsSurfaceFinished()); |
1524 | 0 |
|
1525 | 0 | CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), [&]{ |
1526 | 0 | return aSink->WriteEmptyRow(); |
1527 | 0 | }); |
1528 | 0 | } |
1529 | 0 |
|
1530 | 0 | ResetForNextPass(aSink); |
1531 | 0 |
|
1532 | 0 | { |
1533 | 0 | // Create a buffer the same size as one row of the surface, containing all |
1534 | 0 | // 255 pixels. |
1535 | 0 | uint8_t buffer[100]; |
1536 | 0 | for (int i = 0; i < 100; ++i) { |
1537 | 0 | buffer[i] = 255; |
1538 | 0 | } |
1539 | 0 |
|
1540 | 0 | // Write an empty row to the middle 60 rows of the surface. The first 20 |
1541 | 0 | // and last 20 rows will be 255. (We need to use DoCheckIterativeWrite() |
1542 | 0 | // here because we need a custom function to check the output, since it |
1543 | 0 | // can't be described by a simple rect.) |
1544 | 0 | auto writeFunc = [&](uint32_t aRow) { |
1545 | 0 | if (aRow < 20 || aRow >= 80) { |
1546 | 0 | return aSink->WriteBuffer(buffer); |
1547 | 0 | } else { |
1548 | 0 | return aSink->WriteEmptyRow(); |
1549 | 0 | } |
1550 | 0 | }; |
1551 | 0 |
|
1552 | 0 | auto checkFunc = [&]{ |
1553 | 0 | EXPECT_TRUE(PalettedRowsAreSolidColor(aDecoder, 0, 20, 255)); |
1554 | 0 | EXPECT_TRUE(PalettedRowsAreSolidColor(aDecoder, 20, 60, 0)); |
1555 | 0 | EXPECT_TRUE(PalettedRowsAreSolidColor(aDecoder, 80, 20, 255)); |
1556 | 0 | }; |
1557 | 0 |
|
1558 | 0 | DoCheckIterativeWrite(aSink, writeFunc, checkFunc); |
1559 | 0 | } |
1560 | 0 | }); |
1561 | 0 | } |
1562 | | |
1563 | | TEST(ImageSurfaceSink, PalettedSurfaceSinkWriteUnsafeComputedRow) |
1564 | 0 | { |
1565 | 0 | WithPalettedSurfaceSink(IntRect(0, 0, 100, 100), |
1566 | 0 | [](Decoder* aDecoder, PalettedSurfaceSink* aSink) { |
1567 | 0 | // Create an all-255 buffer the same size as one row of the surface. |
1568 | 0 | uint8_t buffer[100]; |
1569 | 0 | for (int i = 0; i < 100; ++i) { |
1570 | 0 | buffer[i] = 255; |
1571 | 0 | } |
1572 | 0 |
|
1573 | 0 | // Write the buffer to successive rows until every row of the surface has |
1574 | 0 | // been written. We only write to the right half of each row, so we check |
1575 | 0 | // that the left side of the generated image is 0 and the right side is 255. |
1576 | 0 | CheckPalettedIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), [&]{ |
1577 | 0 | return aSink->WriteUnsafeComputedRow<uint8_t>([&](uint8_t* aRow, |
1578 | 0 | uint32_t aLength) { |
1579 | 0 | EXPECT_EQ(100u, aLength ); |
1580 | 0 | memcpy(aRow + 50, buffer, 50 * sizeof(uint8_t)); |
1581 | 0 | }); |
1582 | 0 | }); |
1583 | 0 | }); |
1584 | 0 | } |