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

Unified Diff: include/core/SkShader.h

Issue 221923007: Initial picture shader implementation (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Remove unneeded suppression. Created 6 years, 8 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
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)
« no previous file with comments | « gyp/gmslides.gypi ('k') | src/core/SkPictureShader.h » ('j') | src/core/SkPictureShader.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698