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

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

Issue 536573002: Modifications to DisplayList for better Slimming Paint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Testing FIXME 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
Index: Source/core/rendering/svg/RenderSVGResourceClipper.cpp
diff --git a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
index 3e03d5e6e09ba576f29bdf5c254808b5303b23b1..9bbea44f58da8d96111be6a21064c3eee206a452 100644
--- a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
@@ -245,13 +245,13 @@ void RenderSVGResourceClipper::drawClipMaskContent(GraphicsContext* context, con
}
if (!m_clipContentDisplayList)
- m_clipContentDisplayList = asDisplayList(context, contentTransformation);
+ createDisplayList(context, contentTransformation);
ASSERT(m_clipContentDisplayList);
context->drawDisplayList(m_clipContentDisplayList.get());
}
-PassRefPtr<DisplayList> RenderSVGResourceClipper::asDisplayList(GraphicsContext* context,
+void RenderSVGResourceClipper::createDisplayList(GraphicsContext* context,
const AffineTransform& contentTransformation)
{
ASSERT(context);
@@ -260,7 +260,8 @@ PassRefPtr<DisplayList> RenderSVGResourceClipper::asDisplayList(GraphicsContext*
// Using strokeBoundingBox (instead of paintInvalidationRectInLocalCoordinates) to avoid the intersection
// with local clips/mask, which may yield incorrect results when mixing objectBoundingBox and
// userSpaceOnUse units (http://crbug.com/294900).
- context->beginRecording(strokeBoundingBox());
+ FloatRect bounds = strokeBoundingBox();
+ context->beginRecording(bounds);
// Switch to a paint behavior where all children of this <clipPath> will be rendered using special constraints:
// - fill-opacity/stroke-opacity/opacity set to 1
@@ -304,7 +305,7 @@ PassRefPtr<DisplayList> RenderSVGResourceClipper::asDisplayList(GraphicsContext*
frame()->view()->setPaintBehavior(oldBehavior);
- return context->endRecording();
+ m_clipContentDisplayList = context->endRecording();
}
void RenderSVGResourceClipper::calculateClipContentPaintInvalidationRect()

Powered by Google App Engine
This is Rietveld 408576698