refFoo variant for getters that naturally have a sk_sp
BUG=skia:
Change-Id: I13afa1b81e8a72d93e45fb4d37228be196b0f388
Reviewed-on: https://skia-review.googlesource.com/6923
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index de3b479..f19edf7 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -481,6 +481,7 @@
@return the paint's shader (or NULL)
*/
SkShader* getShader() const { return fShader.get(); }
+ sk_sp<SkShader> refShader() const;
/** Set or clear the shader object.
* Shaders specify the source color(s) for what is being drawn. If a paint
@@ -509,6 +510,7 @@
@return the paint's colorfilter (or NULL)
*/
SkColorFilter* getColorFilter() const { return fColorFilter.get(); }
+ sk_sp<SkColorFilter> refColorFilter() const;
/** Set or clear the paint's colorfilter.
<p />
@@ -528,6 +530,7 @@
@return the paint's patheffect (or NULL)
*/
SkPathEffect* getPathEffect() const { return fPathEffect.get(); }
+ sk_sp<SkPathEffect> refPathEffect() const;
/** Set or clear the patheffect object.
<p />
@@ -547,6 +550,7 @@
@return the paint's maskfilter (or NULL)
*/
SkMaskFilter* getMaskFilter() const { return fMaskFilter.get(); }
+ sk_sp<SkMaskFilter> refMaskFilter() const;
/** Set or clear the maskfilter object.
<p />
@@ -569,6 +573,7 @@
@return the paint's typeface (or NULL)
*/
SkTypeface* getTypeface() const { return fTypeface.get(); }
+ sk_sp<SkTypeface> refTypeface() const;
/** Set or clear the typeface object.
<p />
@@ -588,6 +593,7 @@
@return the paint's rasterizer (or NULL)
*/
SkRasterizer* getRasterizer() const { return fRasterizer.get(); }
+ sk_sp<SkRasterizer> refRasterizer() const;
/** Set or clear the rasterizer object.
<p />
@@ -603,6 +609,7 @@
void setRasterizer(sk_sp<SkRasterizer>);
SkImageFilter* getImageFilter() const { return fImageFilter.get(); }
+ sk_sp<SkImageFilter> refImageFilter() const;
void setImageFilter(sk_sp<SkImageFilter>);
/**
@@ -610,6 +617,8 @@
* reference count.
*/
SkDrawLooper* getDrawLooper() const { return fDrawLooper.get(); }
+ sk_sp<SkDrawLooper> refDrawLooper() const;
+
SkDrawLooper* getLooper() const { return fDrawLooper.get(); }
/**
* Set or clear the looper object.