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

Unified Diff: third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp

Issue 2509113004: Don't paint SVG image documents unless actually painting. (Closed)
Patch Set: none Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
index 3b2c12117c1664908b8b3c39fa28fe73f6f9311d..819ecd92d85c3e4cc926c3e8c95937bc84eea316 100644
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
@@ -491,8 +491,13 @@ void SVGImage::serviceAnimations(double monotonicAnimationStartTime) {
// that will keep the associated SVGImageChromeClient object alive.
Persistent<ImageObserver> protect(getImageObserver());
m_page->animator().serviceScriptedAnimations(monotonicAnimationStartTime);
- m_page->animator().updateAllLifecyclePhases(
- *toLocalFrame(m_page->mainFrame()));
+ // Do *not* update the paint phase. It's critical to paint only when
+ // actually generating painted output, not only for performance reasons,
+ // but to preserve correct coherence of the cache of the output with
+ // the needsRepaint bits of the PaintLayers in the image.
+ toLocalFrame(m_page->mainFrame())
+ ->view()
+ ->updateAllLifecyclePhasesExceptPaint();
}
void SVGImage::advanceAnimationForTesting() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698