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

Unified Diff: Source/core/layout/LayoutObject.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/LayoutObject.cpp
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
index f5e859a4720a8f87dce35e4a1bd908f6355e92dc..851c2d6e4325eee2440de67675f96bf7430d962b 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -1203,8 +1203,12 @@ void LayoutObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv
if (!shouldCheckForPaintInvalidation(paintInvalidationState))
return;
- invalidatePaintIfNeeded(paintInvalidationState, paintInvalidationState.paintInvalidationContainer());
+ PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationState, paintInvalidationState.paintInvalidationContainer());
clearPaintInvalidationState(paintInvalidationState);
+
+ if (reason == PaintInvalidationDelayedFull)
+ view()->pushDelayedPaintInvalidationTarget(*this);
+
invalidatePaintOfSubtreesIfNeeded(paintInvalidationState);
}

Powered by Google App Engine
This is Rietveld 408576698