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

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

Issue 264183002: RAL: Eliminate n^2 walk to find repaint containers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix for SVG Created 6 years, 7 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/svg/RenderSVGModelObject.cpp
diff --git a/Source/core/rendering/svg/RenderSVGModelObject.cpp b/Source/core/rendering/svg/RenderSVGModelObject.cpp
index 64e1b84a1119d8eb390ebd76529ceb3613962b20..15d77516c3547e360b6a35423ba4d218263ce435 100644
--- a/Source/core/rendering/svg/RenderSVGModelObject.cpp
+++ b/Source/core/rendering/svg/RenderSVGModelObject.cpp
@@ -124,7 +124,7 @@ void RenderSVGModelObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads)
quads.append(localToAbsoluteQuad(FloatQuad(repaintRectInLocalCoordinates())));
}
-void RenderSVGModelObject::repaintTreeAfterLayout()
+void RenderSVGModelObject::repaintTreeAfterLayout(RenderLayerModelObject& repaintContainer)
Julien - ping for review 2014/05/07 17:50:03 This should be a const RenderLayerModelObject& as
{
// Note: This is a reduced version of RenderBox::repaintTreeAfterLayout().
// FIXME: Should share code with RenderBox::repaintTreeAfterLayout().
@@ -135,15 +135,15 @@ void RenderSVGModelObject::repaintTreeAfterLayout()
const LayoutRect oldRepaintRect = previousRepaintRect();
const LayoutPoint oldPositionFromRepaintContainer = previousPositionFromRepaintContainer();
- RenderLayerModelObject* repaintContainer = containerForRepaint();
- setPreviousRepaintRect(clippedOverflowRectForRepaint(repaintContainer));
- setPreviousPositionFromRepaintContainer(positionFromRepaintContainer(repaintContainer));
+ RenderLayerModelObject& newRepaintContainer = *containerForRepaint();
+ setPreviousRepaintRect(clippedOverflowRectForRepaint(&newRepaintContainer));
+ setPreviousPositionFromRepaintContainer(positionFromRepaintContainer(&newRepaintContainer));
Julien - ping for review 2014/05/07 17:50:03 It really looks like clippedOverflowrectForRepaint
leviw_travelin_and_unemployed 2014/05/07 17:58:48 There's one exception to this. absoluteClippedOver
// If we are set to do a full repaint that means the RenderView will be
// invalidated. We can then skip issuing of invalidations for the child
// renderers as they'll be covered by the RenderView.
if (view()->doingFullRepaint()) {
- RenderObject::repaintTreeAfterLayout();
+ RenderObject::repaintTreeAfterLayout(newRepaintContainer);
return;
}
@@ -152,7 +152,7 @@ void RenderSVGModelObject::repaintTreeAfterLayout()
repaintAfterLayoutIfNeeded(containerForRepaint(),
shouldDoFullRepaintAfterLayout(), oldRepaintRect, oldPositionFromRepaintContainer, &newRepaintRect, &newPositionFromRepaintContainer);
- RenderObject::repaintTreeAfterLayout();
+ RenderObject::repaintTreeAfterLayout(newRepaintContainer);
}
} // namespace WebCore
« Source/core/rendering/RenderView.h ('K') | « Source/core/rendering/svg/RenderSVGModelObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698