Index: include/core/SkShader.h |
diff --git a/include/core/SkShader.h b/include/core/SkShader.h |
index acff959949ba5114bf2393dd4c0c181b376ab0b5..076ecf5460df9698021913279f6d13f5e3280179 100644 |
--- a/include/core/SkShader.h |
+++ b/include/core/SkShader.h |
@@ -16,6 +16,7 @@ |
#include "SkPaint.h" |
class SkPath; |
+class SkPicture; |
class GrContext; |
class GrEffectRef; |
@@ -345,6 +346,16 @@ public: |
static SkShader* CreateBitmapShader(const SkBitmap& src, |
TileMode tmx, TileMode tmy); |
+ /** Call this to create a new shader that will draw with the specified picture. |
+ * |
+ * @param src The picture to use inside the shader (if not NULL, its ref count |
scroggo
2014/04/11 15:23:15
Is it part of the intended use case to allow the c
f(malita)
2014/04/11 16:05:18
The intent is to treat the picture (playback) as i
|
+ * is incremented). |
+ * @param tmx The tiling mode to use when sampling the bitmap in the x-direction. |
+ * @param tmy The tiling mode to use when sampling the bitmap in the y-direction. |
+ * @return Returns a new shader object. Note: this function never returns null. |
+ */ |
+ static SkShader* CreatePictureShader(SkPicture* src, TileMode tmx, TileMode tmy); |
+ |
SK_TO_STRING_VIRT() |
SK_DEFINE_FLATTENABLE_TYPE(SkShader) |