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

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

Issue 535633002: Common invalidateTreeIfNeeded() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove the ASSERT Created 6 years, 3 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/RenderLayerModelObject.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerModelObject.cpp
diff --git a/Source/core/rendering/RenderLayerModelObject.cpp b/Source/core/rendering/RenderLayerModelObject.cpp
index e340de3fd4ebb33283c95641b5379b1fb386d4aa..88dbd655fc297ffa535f22e4f274280cbf3a3342 100644
--- a/Source/core/rendering/RenderLayerModelObject.cpp
+++ b/Source/core/rendering/RenderLayerModelObject.cpp
@@ -169,25 +169,8 @@ void RenderLayerModelObject::addLayerHitTestRects(LayerHitTestRects& rects, cons
}
}
-InvalidationReason RenderLayerModelObject::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState, const RenderLayerModelObject& newPaintInvalidationContainer)
-{
- const LayoutRect oldPaintInvalidationRect = previousPaintInvalidationRect();
- const LayoutPoint oldPositionFromPaintInvalidationContainer = previousPositionFromPaintInvalidationContainer();
- setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(&newPaintInvalidationContainer, &paintInvalidationState));
- setPreviousPositionFromPaintInvalidationContainer(RenderLayer::positionFromPaintInvalidationContainer(this, &newPaintInvalidationContainer, &paintInvalidationState));
-
- // If we are set to do a full paint invalidation that means the RenderView will 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 InvalidationNone;
-
- return RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalidationState);
-}
-
void RenderLayerModelObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState)
{
- // FIXME: SVG should probably also go through this unified paint invalidation system.
ASSERT(!needsLayout());
if (!shouldCheckForPaintInvalidation(paintInvalidationState))
@@ -198,11 +181,12 @@ void RenderLayerModelObject::invalidateTreeIfNeeded(const PaintInvalidationState
ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation());
InvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationState, newPaintInvalidationContainer);
+ clearPaintInvalidationState(paintInvalidationState);
PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, newPaintInvalidationContainer);
if (reason == InvalidationLocationChange || reason == InvalidationFull)
childTreeWalkState.setForceCheckForPaintInvalidation();
- RenderObject::invalidateTreeIfNeeded(childTreeWalkState);
+ invalidatePaintOfSubtreesIfNeeded(childTreeWalkState);
}
} // namespace blink
« no previous file with comments | « Source/core/rendering/RenderLayerModelObject.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698