diff options
author | 2017-06-05 13:38:13 -0400 | |
---|---|---|
committer | 2017-06-05 18:07:05 +0000 | |
commit | 67d52cf0d8baff02fd4337a62f1f9cd975edc18f (patch) | |
tree | a17ca628b4013026f5628e5841e44b48e6128a13 /src/gpu/GrPathRendering.h | |
parent | bab680d891a201f27b87343a692a902d00d67c0a (diff) |
sk_sp-ify GrResourceProvider some more
I believe this addresses the concerns of this particular bug (although more remains to be done)
Bug: skia:5327
Change-Id: Ie82f08f87b3cf3d7986fe4eeb16a5d2553173913
Reviewed-on: https://skia-review.googlesource.com/18599
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrPathRendering.h')
-rw-r--r-- | src/gpu/GrPathRendering.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gpu/GrPathRendering.h b/src/gpu/GrPathRendering.h index f2c02d9e81..23c731f951 100644 --- a/src/gpu/GrPathRendering.h +++ b/src/gpu/GrPathRendering.h @@ -81,30 +81,27 @@ public: /** * Creates a new gpu path, based on the specified path and stroke and returns it. - * The caller owns a ref on the returned path which must be balanced by a call to unref. * * @param SkPath the geometry. * @param GrStyle the style applied to the path. Styles with non-dash path effects are not * allowed. * @return a new GPU path object. */ - virtual GrPath* createPath(const SkPath&, const GrStyle&) = 0; + virtual sk_sp<GrPath> createPath(const SkPath&, const GrStyle&) = 0; /** - * Creates a range of gpu paths with a common style. The caller owns a ref on the - * returned path range which must be balanced by a call to unref. + * Creates a range of gpu paths with a common style. * * @param PathGenerator class that generates SkPath objects for each path in the range. * @param GrStyle the common style applied to each path in the range. Styles with non-dash * path effects are not allowed. * @return a new path range. */ - virtual GrPathRange* createPathRange(GrPathRange::PathGenerator*, const GrStyle&) = 0; + virtual sk_sp<GrPathRange> createPathRange(GrPathRange::PathGenerator*, const GrStyle&) = 0; /** * Creates a range of glyph paths, indexed by glyph id. The glyphs will have an - * inverted y-direction in order to match the raw font path data. The caller owns - * a ref on the returned path range which must be balanced by a call to unref. + * inverted y-direction in order to match the raw font path data. * * @param SkTypeface Typeface that defines the glyphs. * If null, the default typeface will be used. @@ -129,8 +126,8 @@ public: * * @return a new path range populated with glyphs. */ - GrPathRange* createGlyphs(const SkTypeface*, const SkScalerContextEffects&, - const SkDescriptor*, const GrStyle&); + sk_sp<GrPathRange> createGlyphs(const SkTypeface*, const SkScalerContextEffects&, + const SkDescriptor*, const GrStyle&); /** None of these params are optional, pointers used just to avoid making copies. */ struct StencilPathArgs { |