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

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

Issue 1026823002: [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 7f7e52dab4b00821c2d0e9d6cc0a33e551e49f5e..2120abb9912c64bf0ad7cea98465e2e5de033c82 100644
--- a/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/Source/core/layout/LayoutBoxModelObject.cpp
@@ -264,7 +264,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(reason);
esprehn 2015/03/25 05:06:36 This doesn't seem right from inside the invalidate
chrishtr 2015/03/25 23:30:35 That's a good idea, and as you pointed out elsewhe
+ }
PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, newPaintInvalidationContainer);
if (reason == PaintInvalidationLocationChange)

Powered by Google App Engine
This is Rietveld 408576698