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

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

Issue 2290903002: Change (Pass)RefPtr<SkXxx> into sk_sp<SkXxx>. (Closed)
Patch Set: Rebasing... 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/SVGMaskPainter.h" 5 #include "core/paint/SVGMaskPainter.h"
6 6
7 #include "core/layout/svg/LayoutSVGResourceMasker.h" 7 #include "core/layout/svg/LayoutSVGResourceMasker.h"
8 #include "core/paint/LayoutObjectDrawingRecorder.h" 8 #include "core/paint/LayoutObjectDrawingRecorder.h"
9 #include "core/paint/PaintInfo.h" 9 #include "core/paint/PaintInfo.h"
10 #include "core/paint/TransformRecorder.h" 10 #include "core/paint/TransformRecorder.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 CompositingRecorder maskCompositing(context, object, SkXfermode::kDstIn_ Mode, 1, &paintInvalidationRect, maskLayerFilter); 42 CompositingRecorder maskCompositing(context, object, SkXfermode::kDstIn_ Mode, 1, &paintInvalidationRect, maskLayerFilter);
43 drawMaskForLayoutObject(context, object, object.objectBoundingBox(), pai ntInvalidationRect); 43 drawMaskForLayoutObject(context, object, object.objectBoundingBox(), pai ntInvalidationRect);
44 } 44 }
45 45
46 context.getPaintController().endItem<EndCompositingDisplayItem>(object); 46 context.getPaintController().endItem<EndCompositingDisplayItem>(object);
47 } 47 }
48 48
49 void SVGMaskPainter::drawMaskForLayoutObject(GraphicsContext& context, const Lay outObject& layoutObject, const FloatRect& targetBoundingBox, const FloatRect& ta rgetPaintInvalidationRect) 49 void SVGMaskPainter::drawMaskForLayoutObject(GraphicsContext& context, const Lay outObject& layoutObject, const FloatRect& targetBoundingBox, const FloatRect& ta rgetPaintInvalidationRect)
50 { 50 {
51 AffineTransform contentTransformation; 51 AffineTransform contentTransformation;
52 RefPtr<const SkPicture> maskContentPicture = m_mask.createContentPicture(con tentTransformation, targetBoundingBox, context); 52 sk_sp<const SkPicture> maskContentPicture = m_mask.createContentPicture(cont entTransformation, targetBoundingBox, context);
53 53
54 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, layoutO bject, DisplayItem::kSVGMask)) 54 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, layoutO bject, DisplayItem::kSVGMask))
55 return; 55 return;
56 56
57 LayoutObjectDrawingRecorder drawingRecorder(context, layoutObject, DisplayIt em::kSVGMask, targetPaintInvalidationRect); 57 LayoutObjectDrawingRecorder drawingRecorder(context, layoutObject, DisplayIt em::kSVGMask, targetPaintInvalidationRect);
58 context.save(); 58 context.save();
59 context.concatCTM(contentTransformation); 59 context.concatCTM(contentTransformation);
60 context.drawPicture(maskContentPicture.get()); 60 context.drawPicture(maskContentPicture.get());
61 context.restore(); 61 context.restore();
62 } 62 }
63 63
64 } // namespace blink 64 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698