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

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

Issue 2873003002: Add stable id to PaintImage. (Closed)
Patch Set: rebase 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/Image.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Image.cpp b/third_party/WebKit/Source/platform/graphics/Image.cpp
index 8af49d6721cc861d07342dd7c231efe26879dcb1..be2a1d1525ceb304ff6628014244171ae1a12fbe 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Image.cpp
@@ -52,7 +52,9 @@
namespace blink {
Image::Image(ImageObserver* observer)
- : image_observer_disabled_(false), image_observer_(observer) {}
+ : image_observer_disabled_(false),
+ image_observer_(observer),
+ stable_image_id_(PaintImage::GetNextId()) {}
Image::~Image() {}
@@ -297,7 +299,8 @@ void Image::DrawPattern(GraphicsContext& context,
auto image_id = image.sk_image()->uniqueID();
image =
- PaintImage(image.sk_image()->makeSubset(EnclosingIntRect(norm_src_rect)),
+ PaintImage(stable_image_id_,
+ image.sk_image()->makeSubset(EnclosingIntRect(norm_src_rect)),
image.animation_type(), image.completion_state());
if (!image)
return;
@@ -345,7 +348,8 @@ PaintImage Image::PaintImageForCurrentFrame() {
auto completion_state = CurrentFrameIsComplete()
? PaintImage::CompletionState::DONE
: PaintImage::CompletionState::PARTIALLY_DONE;
- return PaintImage(ImageForCurrentFrame(), animation_type, completion_state);
+ return PaintImage(stable_image_id_, ImageForCurrentFrame(), animation_type,
+ completion_state);
}
bool Image::ApplyShader(PaintFlags& flags, const SkMatrix& local_matrix) {
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Image.h ('k') | third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698