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

Unified Diff: include/core/SkImage.h

Issue 1785473002: SkImage now has makeShader to return sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use build guard for impl of newShader 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 | « gm/rectangletexture.cpp ('k') | samplecode/SampleFilterQuality.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImage.h
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index 0474195ae2f1ad2d69bf9494f1111afff570eb7f..9d112560ad4b3f4faca33f2bb20c81a5431d34b9 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -163,9 +163,13 @@ public:
bool readYUV8Planes(const SkISize[3], void* const planes[3], const size_t rowBytes[3],
SkYUVColorSpace) const;
- virtual SkShader* newShader(SkShader::TileMode,
- SkShader::TileMode,
- const SkMatrix* localMatrix = NULL) const;
+#ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR
+ SkShader* newShader(SkShader::TileMode, SkShader::TileMode,
+ const SkMatrix* localMatrix = nullptr) const;
+#endif
+
+ sk_sp<SkShader> makeShader(SkShader::TileMode, SkShader::TileMode,
+ const SkMatrix* localMatrix = nullptr) const;
/**
* If the image has direct access to its pixels (i.e. they are in local
« no previous file with comments | « gm/rectangletexture.cpp ('k') | samplecode/SampleFilterQuality.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698