Index: include/core/SkShader.h |
diff --git a/include/core/SkShader.h b/include/core/SkShader.h |
index 3e4093645cc2f6ddc301171fc1021f0978293b1a..0bcb98a07e98ebc58e3014911b60b00273bb975a 100644 |
--- a/include/core/SkShader.h |
+++ b/include/core/SkShader.h |
@@ -323,13 +323,13 @@ public: |
* Return a shader that will apply the specified localMatrix to this shader. |
* The specified matrix will be applied before any matrix associated with this shader. |
*/ |
- SkShader* newWithLocalMatrix(const SkMatrix&) const; |
+ sk_sp<SkShader> makeWithLocalMatrix(const SkMatrix&) const; |
/** |
* Create a new shader that produces the same colors as invoking this shader and then applying |
* the colorfilter. |
*/ |
- SkShader* newWithColorFilter(SkColorFilter*) const; |
+ sk_sp<SkShader> makeWithColorFilter(SkColorFilter*) const; |
////////////////////////////////////////////////////////////////////////// |
// Factory methods for stock shaders |
@@ -359,6 +359,13 @@ public: |
static SkShader* CreateComposeShader(SkShader* dst, SkShader* src, SkXfermode* xfer); |
static SkShader* CreatePictureShader(const SkPicture* src, TileMode tmx, TileMode tmy, |
const SkMatrix* localMatrix, const SkRect* tile); |
+ |
+ SkShader* newWithLocalMatrix(const SkMatrix& matrix) const { |
+ return this->makeWithLocalMatrix(matrix).release(); |
+ } |
+ SkShader* newWithColorFilter(SkColorFilter* filter) const { |
+ return this->makeWithColorFilter(filter).release(); |
+ } |
#endif |
/** |