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

Unified Diff: Source/core/rendering/RenderObject.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/RenderObject.h ('k') | Source/core/rendering/svg/RenderSVGBlock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index 7a1df64b3dfb3370ad5e8d9947c8c46199b24506..abd3214a1dab818033b16d538add9a5afc4b6959 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -1604,10 +1604,10 @@ void RenderObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv
{
// If we didn't need paint invalidation then our children don't need as well.
// Skip walking down the tree as everything should be fine below us.
- if (!shouldCheckForPaintInvalidation())
+ if (!shouldCheckForPaintInvalidation(paintInvalidationState))
return;
- clearPaintInvalidationState();
+ clearPaintInvalidationState(paintInvalidationState);
for (RenderObject* child = slowFirstChild(); child; child = child->nextSibling()) {
if (!child->isOutOfFlowPositioned())
@@ -1623,11 +1623,11 @@ static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForOldAndNewRe
return value;
}
-bool RenderObject::invalidatePaintIfNeeded(const RenderLayerModelObject& paintInvalidationContainer, const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const PaintInvalidationState& paintInvalidationState)
+InvalidationReason RenderObject::invalidatePaintIfNeeded(const RenderLayerModelObject& paintInvalidationContainer, const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const PaintInvalidationState& paintInvalidationState)
{
RenderView* v = view();
if (v->document().printing())
- return false; // Don't invalidate paints if we're printing.
+ return InvalidationNone; // Don't invalidate paints if we're printing.
const LayoutRect& newBounds = previousPaintInvalidationRect();
const LayoutPoint& newLocation = previousPositionFromPaintInvalidationContainer();
@@ -1644,15 +1644,15 @@ bool RenderObject::invalidatePaintIfNeeded(const RenderLayerModelObject& paintIn
InvalidationReason invalidationReason = getPaintInvalidationReason(paintInvalidationContainer, oldBounds, oldLocation, newBounds, newLocation);
if (invalidationReason == InvalidationNone)
- return false;
+ return invalidationReason;
if (invalidationReason == InvalidationIncremental) {
incrementallyInvalidatePaint(paintInvalidationContainer, oldBounds, newBounds);
- return false;
+ return invalidationReason;
}
fullyInvalidatePaint(paintInvalidationContainer, invalidationReason, oldBounds, newBounds);
- return true;
+ return invalidationReason;
}
InvalidationReason RenderObject::getPaintInvalidationReason(const RenderLayerModelObject& paintInvalidationContainer,
@@ -3399,11 +3399,11 @@ bool RenderObject::isRelayoutBoundaryForInspector() const
return objectIsRelayoutBoundary(this);
}
-void RenderObject::clearPaintInvalidationState()
+void RenderObject::clearPaintInvalidationState(const PaintInvalidationState& paintInvalidationState)
{
// paintInvalidationStateIsDirty should be kept in sync with the
// booleans that are cleared below.
- ASSERT(paintInvalidationStateIsDirty());
+ ASSERT(paintInvalidationState.forceCheckForPaintInvalidation() || paintInvalidationStateIsDirty());
setShouldDoFullPaintInvalidation(false);
setShouldDoFullPaintInvalidationIfSelfPaintingLayer(false);
setOnlyNeededPositionedMovementLayout(false);
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/svg/RenderSVGBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698