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

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
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/layout/LayoutView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutObject.cpp
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
index f5e859a4720a8f87dce35e4a1bd908f6355e92dc..eb60c910aba967d95d1ee2bcc6fde6c9d6f50715 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -1194,7 +1194,7 @@ void LayoutObject::invalidatePaintRectangle(const LayoutRect& r) const
}
}
-void LayoutObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState)
+void LayoutObject::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalidationState)
{
ASSERT(!needsLayout());
@@ -1203,12 +1203,16 @@ 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)
+ paintInvalidationState.pushDelayedPaintInvalidationTarget(*this);
+
invalidatePaintOfSubtreesIfNeeded(paintInvalidationState);
}
-void LayoutObject::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPaintInvalidationState)
+void LayoutObject::invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState& childPaintInvalidationState)
{
for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibling()) {
if (!child->isOutOfFlowPositioned())
@@ -1274,7 +1278,7 @@ void LayoutObject::invalidateSelectionIfNeeded(const LayoutBoxModelObject& paint
fullyInvalidatePaint(paintInvalidationContainer, PaintInvalidationSelection, oldSelectionRect, newSelectionRect);
}
-PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationContainer)
+PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationState& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationContainer)
{
LayoutView* v = view();
if (v->document().printing())
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/layout/LayoutView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698