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

Unified Diff: Source/core/paint/SVGClipPainter.cpp

Issue 1308983007: Move painting code out of LayoutSVGResourceClipper (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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/paint/SVGClipPainter.cpp
diff --git a/Source/core/paint/SVGClipPainter.cpp b/Source/core/paint/SVGClipPainter.cpp
index 2ad91ba5e6cad7fd7fc54aed54877b3d0313aa6d..22e61e5291dfe3d1ad416687eddfdd05c413ec90 100644
--- a/Source/core/paint/SVGClipPainter.cpp
+++ b/Source/core/paint/SVGClipPainter.cpp
@@ -60,8 +60,16 @@ bool SVGClipPainter::applyClippingToContext(const LayoutObject& target, const Fl
}
// First, try to apply the clip as a clipPath.
- if (m_clip.tryPathOnlyClipping(target, context, animatedLocalTransform, targetBoundingBox)) {
+ Path clipPath;
+ if (m_clip.asPath(animatedLocalTransform, targetBoundingBox, clipPath)) {
clipperState = ClipperAppliedPath;
+ if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
+ if (!context->displayItemList()->displayItemConstructionIsDisabled())
+ context->displayItemList()->createAndAppend<BeginClipPathDisplayItem>(target, clipPath);
+ } else {
+ BeginClipPathDisplayItem clipPathDisplayItem(target, clipPath);
+ clipPathDisplayItem.replay(*context);
+ }
return true;
}

Powered by Google App Engine
This is Rietveld 408576698