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

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

Issue 741123002: Get rid of computeFloatRectForPaintInvalidation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Return reference; Fixup references in comments. Created 6 years, 1 month 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/RenderSVGRoot.h ('k') | Source/core/rendering/svg/SVGRenderSupport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGRoot.cpp
diff --git a/Source/core/rendering/svg/RenderSVGRoot.cpp b/Source/core/rendering/svg/RenderSVGRoot.cpp
index dadbf2252401145717ca03cb052d3057536b5602..78aa6c6ffc1f5e899453dcc26476d85f0e9ae889 100644
--- a/Source/core/rendering/svg/RenderSVGRoot.cpp
+++ b/Source/core/rendering/svg/RenderSVGRoot.cpp
@@ -297,7 +297,7 @@ const AffineTransform& RenderSVGRoot::localToParentTransform() const
LayoutRect RenderSVGRoot::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const
{
// This is an open-coded aggregate of SVGRenderSupport::clippedOverflowRectForPaintInvalidation,
- // RenderSVGRoot::computeFloatRectForPaintInvalidation and RenderReplaced::clippedOverflowRectForPaintInvalidation.
+ // RenderSVGRoot::mapRectToPaintInvalidationBacking and RenderReplaced::clippedOverflowRectForPaintInvalidation.
// The reason for this is to optimize/minimize the paint invalidation rect when the box is not "decorated"
// (does not have background/border/etc.)
@@ -328,19 +328,16 @@ LayoutRect RenderSVGRoot::clippedOverflowRectForPaintInvalidation(const RenderLa
return rect;
}
-void RenderSVGRoot::computeFloatRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, FloatRect& paintInvalidationRect, const PaintInvalidationState* paintInvalidationState) const
+void RenderSVGRoot::mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const
{
- // Apply our local transforms (except for x/y translation), then our shadow,
- // and then call RenderBox's method to handle all the normal CSS Box model bits
- paintInvalidationRect = m_localToBorderBoxTransform.mapRect(paintInvalidationRect);
+ // Note that we don't apply the border-box transform here - it's assumed
+ // that whoever called us has done that already.
// Apply initial viewport clip
if (shouldApplyViewportClip())
- paintInvalidationRect.intersect(pixelSnappedBorderBoxRect());
+ rect.intersect(pixelSnappedBorderBoxRect());
- LayoutRect rect = enclosingIntRect(paintInvalidationRect);
RenderReplaced::mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, paintInvalidationState);
- paintInvalidationRect = rect;
}
// This method expects local CSS box coordinates.
« no previous file with comments | « Source/core/rendering/svg/RenderSVGRoot.h ('k') | Source/core/rendering/svg/SVGRenderSupport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698