Index: src/image/SkImage.cpp |
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp |
index 07279501a38df3db1b7e4f5d48d771690f3729d3..cbd9edd2e380a27d44c5235ae3d536bedc26c23b 100644 |
--- a/src/image/SkImage.cpp |
+++ b/src/image/SkImage.cpp |
@@ -91,11 +91,17 @@ void SkImage::preroll(GrContext* ctx) const { |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
-SkShader* SkImage::newShader(SkShader::TileMode tileX, |
- SkShader::TileMode tileY, |
+sk_sp<SkShader> SkImage::makeShader(SkShader::TileMode tileX, SkShader::TileMode tileY, |
+ const SkMatrix* localMatrix) const { |
+ return SkImageShader::Make(this, tileX, tileY, localMatrix); |
+} |
+ |
+#ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR |
+SkShader* SkImage::newShader(SkShader::TileMode tileX, SkShader::TileMode tileY, |
const SkMatrix* localMatrix) const { |
- return SkImageShader::Create(this, tileX, tileY, localMatrix); |
+ return this->makeShader(tileX, tileY, localMatrix).release(); |
} |
+#endif |
SkData* SkImage::encode(SkImageEncoder::Type type, int quality) const { |
SkBitmap bm; |