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

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

Issue 2290903002: Change (Pass)RefPtr<SkXxx> into sk_sp<SkXxx>. (Closed)
Patch Set: Self-review. Created 4 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 unified diff | Download patch
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 "core/paint/SVGClipPainter.h" 5 #include "core/paint/SVGClipPainter.h"
6 6
7 #include "core/dom/ElementTraversal.h" 7 #include "core/dom/ElementTraversal.h"
8 #include "core/layout/svg/LayoutSVGResourceClipper.h" 8 #include "core/layout/svg/LayoutSVGResourceClipper.h"
9 #include "core/layout/svg/SVGLayoutSupport.h" 9 #include "core/layout/svg/SVGLayoutSupport.h"
10 #include "core/layout/svg/SVGResources.h" 10 #include "core/layout/svg/SVGResources.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 { 124 {
125 AffineTransform contentTransform; 125 AffineTransform contentTransform;
126 if (m_clip.clipPathUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundi ngbox) { 126 if (m_clip.clipPathUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundi ngbox) {
127 contentTransform.translate(targetBoundingBox.x(), targetBounding Box.y()); 127 contentTransform.translate(targetBoundingBox.x(), targetBounding Box.y());
128 contentTransform.scaleNonUniform(targetBoundingBox.width(), targ etBoundingBox.height()); 128 contentTransform.scaleNonUniform(targetBoundingBox.width(), targ etBoundingBox.height());
129 } 129 }
130 SubtreeContentTransformScope contentTransformScope(contentTransform) ; 130 SubtreeContentTransformScope contentTransformScope(contentTransform) ;
131 131
132 TransformRecorder contentTransformRecorder(maskContext, layoutObject , contentTransform); 132 TransformRecorder contentTransformRecorder(maskContext, layoutObject , contentTransform);
133 RefPtr<const SkPicture> clipContentPicture = m_clip.createContentPic ture(); 133 maskContext.getPaintController().createAndAppend<DrawingDisplayItem> (layoutObject, DisplayItem::kSVGClip, m_clip.createContentPicture());
134 maskContext.getPaintController().createAndAppend<DrawingDisplayItem> (layoutObject, DisplayItem::kSVGClip, clipContentPicture.get());
135 } 134 }
136 135
137 if (clipPathClipper) 136 if (clipPathClipper)
138 SVGClipPainter(*clipPathClipper).finishEffect(m_clip, maskContext, c lipPathClipperState); 137 SVGClipPainter(*clipPathClipper).finishEffect(m_clip, maskContext, c lipPathClipperState);
139 } 138 }
140 139
141 LayoutObjectDrawingRecorder drawingRecorder(context, layoutObject, DisplayIt em::kSVGClip, targetPaintInvalidationRect); 140 LayoutObjectDrawingRecorder drawingRecorder(context, layoutObject, DisplayIt em::kSVGClip, targetPaintInvalidationRect);
142 RefPtr<SkPicture> maskPicture = maskPictureBuilder.endRecording(); 141 sk_sp<SkPicture> maskPicture = maskPictureBuilder.endRecording();
143 context.drawPicture(maskPicture.get()); 142 context.drawPicture(maskPicture.get());
f(malita) 2016/09/01 03:55:37 Nit: .get() not needed anymore.
Łukasz Anforowicz 2016/09/01 20:50:57 This won't work - AFAICT blink::GraphicsContext::d
f(malita) 2016/09/01 21:03:43 Doh, yeah, I was thinking we're drawing to an SkCa
144 return true; 143 return true;
145 } 144 }
146 145
147 } // namespace blink 146 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698