Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(719)

Unified Diff: third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp

Issue 2880813002: Revert of Add stable id to PaintImage. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 c0d811f385dd2bf7dee5c46675aad049caa98710..2e0e007cc221b427abeb514d1eeb28400a623a86 100644
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp
@@ -163,8 +163,7 @@
PaintRecorder recorder;
PaintCanvas* temp_canvas = recorder.beginRecording(100, 100);
- temp_canvas->drawImage(PaintImage(PaintImage::GetNextId(), std::move(image)),
- 0, 0);
+ temp_canvas->drawImage(PaintImage(std::move(image)), 0, 0);
sk_sp<PaintRecord> record = recorder.finishRecordingAsPicture();
EXPECT_EQ(0, decode_request_count_);
@@ -183,9 +182,8 @@
ASSERT_TRUE(image);
PaintRecorder recorder;
PaintCanvas* temp_canvas = recorder.beginRecording(100, 100);
- PaintImage::Id stable_id = PaintImage::GetNextId();
temp_canvas->drawImage(
- PaintImage(stable_id, std::move(image), PaintImage::AnimationType::STATIC,
+ PaintImage(std::move(image), PaintImage::AnimationType::STATIC,
PaintImage::CompletionState::PARTIALLY_DONE),
0, 0);
canvas_->drawPicture(recorder.finishRecordingAsPicture());
@@ -195,7 +193,7 @@
image = lazy_decoder_->CreateFrameAtIndex(0);
ASSERT_TRUE(image);
temp_canvas = recorder.beginRecording(100, 100);
- temp_canvas->drawImage(PaintImage(stable_id, std::move(image)), 0, 0);
+ temp_canvas->drawImage(PaintImage(std::move(image)), 0, 0);
canvas_->drawPicture(recorder.finishRecordingAsPicture());
EXPECT_EQ(SkColorSetARGB(255, 255, 255, 255), bitmap_.getColor(0, 0));
}
@@ -213,8 +211,7 @@
PaintRecorder recorder;
PaintCanvas* temp_canvas = recorder.beginRecording(100, 100);
- temp_canvas->drawImage(PaintImage(PaintImage::GetNextId(), std::move(image)),
- 0, 0);
+ temp_canvas->drawImage(PaintImage(std::move(image)), 0, 0);
sk_sp<PaintRecord> record = recorder.finishRecordingAsPicture();
EXPECT_EQ(0, decode_request_count_);
@@ -308,8 +305,7 @@
// The following code should not fail any assert.
PaintRecorder recorder;
PaintCanvas* temp_canvas = recorder.beginRecording(100, 100);
- temp_canvas->drawImage(PaintImage(PaintImage::GetNextId(), std::move(image)),
- 0, 0);
+ temp_canvas->drawImage(PaintImage(std::move(image)), 0, 0);
sk_sp<PaintRecord> record = recorder.finishRecordingAsPicture();
EXPECT_EQ(0, decode_request_count_);
canvas_->drawPicture(record);
« no previous file with comments | « third_party/WebKit/Source/platform/DragImage.cpp ('k') | third_party/WebKit/Source/platform/graphics/Image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698