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

Unified Diff: Source/core/rendering/svg/RenderSVGModelObject.cpp

Issue 380583003: Revert of Revert of Divorce PaintInvalidationState from LayoutState (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.h ('k') | Source/core/rendering/svg/RenderSVGRoot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGModelObject.cpp
diff --git a/Source/core/rendering/svg/RenderSVGModelObject.cpp b/Source/core/rendering/svg/RenderSVGModelObject.cpp
index 79d09a4078b108cc18305ee0a71376c4d0b17e04..385f5b008d81a13a681bc4c22e872283f2c3310b 100644
--- a/Source/core/rendering/svg/RenderSVGModelObject.cpp
+++ b/Source/core/rendering/svg/RenderSVGModelObject.cpp
@@ -50,19 +50,19 @@
return child->isSVG() && !(child->isSVGInline() || child->isSVGInlineText());
}
-LayoutRect RenderSVGModelObject::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer) const
+LayoutRect RenderSVGModelObject::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const
{
- return SVGRenderSupport::clippedOverflowRectForRepaint(this, paintInvalidationContainer);
+ return SVGRenderSupport::clippedOverflowRectForRepaint(this, paintInvalidationContainer, paintInvalidationState);
}
-void RenderSVGModelObject::computeFloatRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, FloatRect& paintInvalidationRect, bool fixed) const
+void RenderSVGModelObject::computeFloatRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, FloatRect& paintInvalidationRect, bool fixed, const PaintInvalidationState* paintInvalidationState) const
{
- SVGRenderSupport::computeFloatRectForRepaint(this, paintInvalidationContainer, paintInvalidationRect, fixed);
+ SVGRenderSupport::computeFloatRectForRepaint(this, paintInvalidationContainer, paintInvalidationRect, fixed, paintInvalidationState);
}
-void RenderSVGModelObject::mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState& transformState, MapCoordinatesFlags, bool* wasFixed) const
+void RenderSVGModelObject::mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState& transformState, MapCoordinatesFlags, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const
{
- SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState, wasFixed);
+ SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState, wasFixed, paintInvalidationState);
}
const RenderObject* RenderSVGModelObject::pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const
@@ -124,7 +124,7 @@
quads.append(localToAbsoluteQuad(FloatQuad(paintInvalidationRectInLocalCoordinates())));
}
-void RenderSVGModelObject::invalidateTreeAfterLayout(const RenderLayerModelObject& paintInvalidationContainer)
+void RenderSVGModelObject::invalidateTreeAfterLayout(const PaintInvalidationState& paintInvalidationState)
{
// Note: This is a reduced version of RenderBox::invalidateTreeAfterLayout().
// FIXME: Should share code with RenderBox::invalidateTreeAfterLayout().
@@ -133,13 +133,13 @@
if (!shouldCheckForPaintInvalidationAfterLayout())
return;
- ForceHorriblySlowRectMapping slowRectMapping(*this);
+ ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState);
const LayoutRect oldPaintInvalidationRect = previousPaintInvalidationRect();
const LayoutPoint oldPositionFromPaintInvalidationContainer = previousPositionFromPaintInvalidationContainer();
- ASSERT(&paintInvalidationContainer == containerForPaintInvalidation());
- setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(&paintInvalidationContainer));
- setPreviousPositionFromPaintInvalidationContainer(RenderLayer::positionFromPaintInvalidationContainer(this, &paintInvalidationContainer));
+ ASSERT(paintInvalidationState.paintInvalidationContainer() == containerForPaintInvalidation());
+ setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(&paintInvalidationState.paintInvalidationContainer(), &paintInvalidationState));
+ setPreviousPositionFromPaintInvalidationContainer(RenderLayer::positionFromPaintInvalidationContainer(this, &paintInvalidationState.paintInvalidationContainer(), &paintInvalidationState));
// If an ancestor container had its transform changed, then we just
// need to update the RenderSVGModelObject's repaint rect above. The invalidation
@@ -152,13 +152,13 @@
// 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()->doingFullRepaint()) {
- RenderObject::invalidateTreeAfterLayout(paintInvalidationContainer);
+ RenderObject::invalidateTreeAfterLayout(paintInvalidationState);
return;
}
invalidatePaintIfNeeded(paintInvalidationState.paintInvalidationContainer(), oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer);
- RenderObject::invalidateTreeAfterLayout(paintInvalidationContainer);
+ RenderObject::invalidateTreeAfterLayout(paintInvalidationState);
}
} // namespace WebCore
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.h ('k') | Source/core/rendering/svg/RenderSVGRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698