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

Unified Diff: Source/core/layout/LayoutBoxModelObject.cpp

Issue 1008043002: [S.P.] Don't draw frames of animated images that are offscreen. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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: Source/core/layout/LayoutBoxModelObject.cpp
diff --git a/Source/core/layout/LayoutBoxModelObject.cpp b/Source/core/layout/LayoutBoxModelObject.cpp
index e07fa6e62d56fff44c15f7ca30b2936822caa5a2..131694909fe9b652c7a3087ca3db7ed73aacef6a 100644
--- a/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/Source/core/layout/LayoutBoxModelObject.cpp
@@ -250,7 +250,12 @@ void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
// ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation());
PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationState, newPaintInvalidationContainer);
- clearPaintInvalidationState(paintInvalidationState);
+ if (reason != PaintInvalidationDelayedFull) {
+ clearPaintInvalidationState(paintInvalidationState);
+ } else {
+ // Mark this object as needing paint invalidation again in the next frame, due to the request for delayed paint invalidation.
+ setShouldDoFullPaintInvalidation();
+ }
PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, newPaintInvalidationContainer);
if (reason == PaintInvalidationLocationChange)

Powered by Google App Engine
This is Rietveld 408576698