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

Unified Diff: include/effects/Sk2DPathEffect.h

Issue 1813123003: Reland of "switch patheffects over to sk_sp (patchset #5 id:80001 of https://codereview.chromium.or… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move flag into sktypes, so it is visible to both paint and other patheffect clients Created 4 years, 9 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
« no previous file with comments | « include/effects/Sk1DPathEffect.h ('k') | include/effects/SkArcToPathEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/Sk2DPathEffect.h
diff --git a/include/effects/Sk2DPathEffect.h b/include/effects/Sk2DPathEffect.h
index 73da83c4b960dd84facb5ca1c7073ba33e034177..823a6ad9d87b25a59255d7d69ab39c70cc26d049 100644
--- a/include/effects/Sk2DPathEffect.h
+++ b/include/effects/Sk2DPathEffect.h
@@ -55,8 +55,8 @@ private:
class SK_API SkLine2DPathEffect : public Sk2DPathEffect {
public:
- static SkPathEffect* Create(SkScalar width, const SkMatrix& matrix) {
- return new SkLine2DPathEffect(width, matrix);
+ static sk_sp<SkPathEffect> Make(SkScalar width, const SkMatrix& matrix) {
+ return sk_sp<SkPathEffect>(new SkLine2DPathEffect(width, matrix));
}
virtual bool filterPath(SkPath* dst, const SkPath& src,
@@ -84,8 +84,8 @@ public:
* Stamp the specified path to fill the shape, using the matrix to define
* the latice.
*/
- static SkPathEffect* Create(const SkMatrix& matrix, const SkPath& path) {
- return new SkPath2DPathEffect(matrix, path);
+ static sk_sp<SkPathEffect> Make(const SkMatrix& matrix, const SkPath& path) {
+ return sk_sp<SkPathEffect>(new SkPath2DPathEffect(matrix, path));
}
SK_TO_STRING_OVERRIDE()
« no previous file with comments | « include/effects/Sk1DPathEffect.h ('k') | include/effects/SkArcToPathEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698