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

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

Issue 2340683002: Advance image animations when drawing as shaders (Closed)
Patch Set: refresh in applyShader() Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/backgrounds/animated-gif-as-background-rounded-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9408ace1b70c3dd7f8ba1846b20dda0533aae185..962fd2a506e6037c72ef5923b62b655342cc5eff 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Image.cpp
@@ -273,6 +273,9 @@ bool Image::applyShader(SkPaint& paint, const SkMatrix& localMatrix)
paint.setShader(
image->makeShader(SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &localMatrix));
+ // Animation is normally refreshed in draw() impls, which we don't call when painting via shaders.
+ startAnimation();
+
return true;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/backgrounds/animated-gif-as-background-rounded-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698