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

Side by Side Diff: Source/core/paint/SVGClipPainter.cpp

Issue 1160183003: Use SkPictureBuilder in SVGShapePainter, and generalize SkPictureBuilder. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/SVGClipPainter.h" 6 #include "core/paint/SVGClipPainter.h"
7 7
8 #include "core/dom/ElementTraversal.h" 8 #include "core/dom/ElementTraversal.h"
9 #include "core/layout/svg/LayoutSVGResourceClipper.h" 9 #include "core/layout/svg/LayoutSVGResourceClipper.h"
10 #include "core/layout/svg/SVGResources.h" 10 #include "core/layout/svg/SVGResources.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 default: 118 default:
119 ASSERT_NOT_REACHED(); 119 ASSERT_NOT_REACHED();
120 } 120 }
121 } 121 }
122 122
123 void SVGClipPainter::drawClipMaskContent(GraphicsContext* context, const LayoutO bject& layoutObject, const FloatRect& targetBoundingBox) 123 void SVGClipPainter::drawClipMaskContent(GraphicsContext* context, const LayoutO bject& layoutObject, const FloatRect& targetBoundingBox)
124 { 124 {
125 ASSERT(context); 125 ASSERT(context);
126 126
127 AffineTransform contentTransformation; 127 AffineTransform contentTransformation;
128 RefPtr<const SkPicture> clipContentPicture = m_clip.createContentPicture(con tentTransformation, targetBoundingBox); 128 RefPtr<const SkPicture> clipContentPicture = m_clip.createContentPicture(con tentTransformation, targetBoundingBox, context);
129 129
130 TransformRecorder recorder(*context, layoutObject, contentTransformation); 130 TransformRecorder recorder(*context, layoutObject, contentTransformation);
131 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { 131 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
132 ASSERT(context->displayItemList()); 132 ASSERT(context->displayItemList());
133 if (context->displayItemList()->displayItemConstructionIsDisabled()) 133 if (context->displayItemList()->displayItemConstructionIsDisabled())
134 return; 134 return;
135 context->displayItemList()->add(DrawingDisplayItem::create(layoutObject, DisplayItem::SVGClip, clipContentPicture)); 135 context->displayItemList()->add(DrawingDisplayItem::create(layoutObject, DisplayItem::SVGClip, clipContentPicture));
136 } else { 136 } else {
137 DrawingDisplayItem clipPicture(layoutObject, DisplayItem::SVGClip, clipC ontentPicture); 137 DrawingDisplayItem clipPicture(layoutObject, DisplayItem::SVGClip, clipC ontentPicture);
138 clipPicture.replay(*context); 138 clipPicture.replay(*context);
139 } 139 }
140 } 140 }
141 141
142 } 142 }
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGResourceMasker.cpp ('k') | Source/core/paint/SVGMaskPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698