Index: Source/core/rendering/RenderLayerModelObject.cpp |
diff --git a/Source/core/rendering/RenderLayerModelObject.cpp b/Source/core/rendering/RenderLayerModelObject.cpp |
index 16587ac73d9a3e1ee351f496c70c48d4c96923d5..eec3bc60f96852d01efa5d4c17c1600e42811375 100644 |
--- a/Source/core/rendering/RenderLayerModelObject.cpp |
+++ b/Source/core/rendering/RenderLayerModelObject.cpp |
@@ -179,5 +179,39 @@ void RenderLayerModelObject::addLayerHitTestRects(LayerHitTestRects& rects, cons |
} |
} |
+void 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 be |
dsinclair
2014/08/05 15:09:48
s/will be/will/
leviw_travelin_and_unemployed
2014/08/05 22:34:44
Done.
|
+ // 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; |
+ |
+ RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalidationState); |
+} |
+ |
+void RenderLayerModelObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState) |
+{ |
+ // FIXME: SVG should probably also go through this unified paint invalidation system. |
dsinclair
2014/07/31 17:49:42
Should we make a bug for this and track why SVG do
|
+ ASSERT(!needsLayout()); |
+ |
+ if (!shouldCheckForPaintInvalidation()) |
+ return; |
+ |
+ bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer(); |
+ const RenderLayerModelObject& newPaintInvalidationContainer = *adjustCompositedContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : &paintInvalidationState.paintInvalidationContainer()); |
+ ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation()); |
+ |
+ invalidatePaintIfNeeded(paintInvalidationState, newPaintInvalidationContainer); |
+ |
+ PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, newPaintInvalidationContainer); |
+ RenderObject::invalidateTreeIfNeeded(childTreeWalkState); |
+} |
+ |
} // namespace blink |