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

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: Stop at invalidation containers Created 6 years, 5 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/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index cadb60c657c9f07ffa7d796e95fa7fd8748d4454..d1ce2663253a619bb43ec21ae0a8d71bbb88fb91 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);
+ bool didFullyInvalidatePaint = invalidatePaintIfNeeded(paintInvalidationState, newPaintInvalidationContainer);
// This is for the next invalidatePaintIfNeeded so must be after invalidatePaintIfNeeded.
savePreviousBorderBoxSizeIfNeeded();
PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, newPaintInvalidationContainer);
+ if (didFullyInvalidatePaint)
Julien - ping for review 2014/08/01 21:20:01 AFAICT this will make us force paint invalidation
abarth-chromium 2014/08/01 21:22:51 Ok. I'll tighten this down.
+ childTreeWalkState.setForceCheckForPaintInvalidation();
RenderObject::invalidateTreeIfNeeded(childTreeWalkState);
}
-void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState, const RenderLayerModelObject& newPaintInvalidationContainer)
+bool 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 false;
if ((onlyNeededPositionedMovementLayout() && compositingState() != PaintsIntoOwnBacking)
|| (shouldDoFullPaintInvalidationIfSelfPaintingLayer()
@@ -1593,12 +1595,13 @@ void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInval
setShouldDoFullPaintInvalidation(true, MarkOnlyThis);
}
- if (!RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalidationState))
+ bool didFullyInvalidatePaint = RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalidationState);
+ if (!didFullyInvalidatePaint)
invalidatePaintForOverflowIfNeeded();
// Issue paint invalidations for any scrollbars if there is a scrollable area for this renderer.
- if (enclosingLayer()) {
- if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea()) {
+ if (RenderLayer* layer = enclosingLayer()) {
+ if (RenderLayerScrollableArea* area = layer->scrollableArea()) {
Julien - ping for review 2014/08/01 21:20:01 I wouldn't touch this, we spotted that this code d
abarth-chromium 2014/08/01 21:22:51 ok
if (area->hasVerticalBarDamage())
invalidatePaintRectangle(area->verticalBarDamage());
if (area->hasHorizontalBarDamage())
@@ -1606,6 +1609,8 @@ void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInval
area->resetScrollbarDamage();
}
}
+
+ return didFullyInvalidatePaint;
}
bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumulatedOffset, ContentsClipBehavior contentsClipBehavior)

Powered by Google App Engine
This is Rietveld 408576698