Index: third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
index 1518f51ed77e25ca352366285edb129eb2a27e33..905b2d3830a6bff94ca44cb1de4d2cbbbd979b13 100644 |
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
@@ -163,7 +163,8 @@ TEST_F(DeferredImageDecoderTest, drawIntoPaintRecord) { |
PaintRecorder recorder; |
PaintCanvas* temp_canvas = recorder.beginRecording(100, 100); |
- temp_canvas->drawImage(PaintImage(std::move(image)), 0, 0); |
+ temp_canvas->drawImage(PaintImage(PaintImage::GetNextId(), std::move(image)), |
+ 0, 0); |
sk_sp<PaintRecord> record = recorder.finishRecordingAsPicture(); |
EXPECT_EQ(0, decode_request_count_); |
@@ -182,8 +183,9 @@ TEST_F(DeferredImageDecoderTest, drawIntoPaintRecordProgressive) { |
ASSERT_TRUE(image); |
PaintRecorder recorder; |
PaintCanvas* temp_canvas = recorder.beginRecording(100, 100); |
+ PaintImage::Id stable_id = PaintImage::GetNextId(); |
temp_canvas->drawImage( |
- PaintImage(std::move(image), PaintImage::AnimationType::STATIC, |
+ PaintImage(stable_id, std::move(image), PaintImage::AnimationType::STATIC, |
PaintImage::CompletionState::PARTIALLY_DONE), |
0, 0); |
canvas_->drawPicture(recorder.finishRecordingAsPicture()); |
@@ -193,7 +195,7 @@ TEST_F(DeferredImageDecoderTest, drawIntoPaintRecordProgressive) { |
image = lazy_decoder_->CreateFrameAtIndex(0); |
ASSERT_TRUE(image); |
temp_canvas = recorder.beginRecording(100, 100); |
- temp_canvas->drawImage(PaintImage(std::move(image)), 0, 0); |
+ temp_canvas->drawImage(PaintImage(stable_id, std::move(image)), 0, 0); |
canvas_->drawPicture(recorder.finishRecordingAsPicture()); |
EXPECT_EQ(SkColorSetARGB(255, 255, 255, 255), bitmap_.getColor(0, 0)); |
} |
@@ -211,7 +213,8 @@ TEST_F(DeferredImageDecoderTest, decodeOnOtherThread) { |
PaintRecorder recorder; |
PaintCanvas* temp_canvas = recorder.beginRecording(100, 100); |
- temp_canvas->drawImage(PaintImage(std::move(image)), 0, 0); |
+ temp_canvas->drawImage(PaintImage(PaintImage::GetNextId(), std::move(image)), |
+ 0, 0); |
sk_sp<PaintRecord> record = recorder.finishRecordingAsPicture(); |
EXPECT_EQ(0, decode_request_count_); |
@@ -305,7 +308,8 @@ TEST_F(DeferredImageDecoderTest, decodedSize) { |
// The following code should not fail any assert. |
PaintRecorder recorder; |
PaintCanvas* temp_canvas = recorder.beginRecording(100, 100); |
- temp_canvas->drawImage(PaintImage(std::move(image)), 0, 0); |
+ temp_canvas->drawImage(PaintImage(PaintImage::GetNextId(), std::move(image)), |
+ 0, 0); |
sk_sp<PaintRecord> record = recorder.finishRecordingAsPicture(); |
EXPECT_EQ(0, decode_request_count_); |
canvas_->drawPicture(record); |