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

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 433603004: Disentangle repaint-after-compositing from updateLayerPositionsAfterLayout (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 4 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/rendering/RenderBox.h ('k') | Source/core/rendering/RenderInline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 529871d6d3260b4d4e337ab9cb7a7e4b58bd5a80..b90a306c0e4b1d8a81b39d22762fe998e6a0c60c 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -1557,23 +1557,25 @@ void RenderBox::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvali
// FIXME: SVG should probably also go through this unified paint invalidation system.
ASSERT(!needsLayout());
- if (!shouldCheckForPaintInvalidation())
+ if (!shouldCheckForPaintInvalidation(paintInvalidationState))
return;
bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer();
const RenderLayerModelObject& newPaintInvalidationContainer = *adjustCompositedContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : &paintInvalidationState.paintInvalidationContainer());
ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation());
- invalidatePaintIfNeeded(paintInvalidationState, newPaintInvalidationContainer);
+ InvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationState, newPaintInvalidationContainer);
// This is for the next invalidatePaintIfNeeded so must be after invalidatePaintIfNeeded.
savePreviousBorderBoxSizeIfNeeded();
PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, newPaintInvalidationContainer);
+ if (reason == InvalidationLocationChange || reason == InvalidationFull)
+ childTreeWalkState.setForceCheckForPaintInvalidation();
RenderObject::invalidateTreeIfNeeded(childTreeWalkState);
}
-void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState, const RenderLayerModelObject& newPaintInvalidationContainer)
+InvalidationReason RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState, const RenderLayerModelObject& newPaintInvalidationContainer)
{
const LayoutRect oldPaintInvalidationRect = previousPaintInvalidationRect();
const LayoutPoint oldPositionFromPaintInvalidationContainer = previousPositionFromPaintInvalidationContainer();
@@ -1584,7 +1586,7 @@ void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInval
// issue paint invalidations. We can then skip issuing of paint invalidations for the child
// renderers as they'll be covered by the RenderView.
if (view()->doingFullPaintInvalidation())
- return;
+ return InvalidationNone;
if ((onlyNeededPositionedMovementLayout() && compositingState() != PaintsIntoOwnBacking)
|| (shouldDoFullPaintInvalidationIfSelfPaintingLayer()
@@ -1593,7 +1595,8 @@ void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInval
setShouldDoFullPaintInvalidation(true, MarkOnlyThis);
}
- if (!RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalidationState))
+ InvalidationReason reason = RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalidationState);
+ if (reason == InvalidationNone || reason == InvalidationIncremental)
invalidatePaintForOverflowIfNeeded();
// Issue paint invalidations for any scrollbars if there is a scrollable area for this renderer.
@@ -1603,11 +1606,12 @@ void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInval
if (area->hasHorizontalBarDamage())
invalidatePaintRectangle(area->horizontalBarDamage());
}
+ return reason;
}
-void RenderBox::clearPaintInvalidationState()
+void RenderBox::clearPaintInvalidationState(const PaintInvalidationState& paintInvalidationState)
{
- RenderBoxModelObject::clearPaintInvalidationState();
+ RenderBoxModelObject::clearPaintInvalidationState(paintInvalidationState);
if (ScrollableArea* area = scrollableArea())
area->resetScrollbarDamage();
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | Source/core/rendering/RenderInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698