Index: include/core/SkShader.h |
diff --git a/include/core/SkShader.h b/include/core/SkShader.h |
index 0de53ad65240a839e7889a838cdca2c02561e561..60aa7cd6c9a585c58cd7d1ad6ef531d60f39dcd4 100644 |
--- a/include/core/SkShader.h |
+++ b/include/core/SkShader.h |
@@ -17,6 +17,7 @@ |
#include "../gpu/GrColor.h" |
class SkColorFilter; |
+class SkColorSpace; |
class SkPath; |
class SkPicture; |
class SkXfermode; |
@@ -375,6 +376,14 @@ public: |
*/ |
static sk_sp<SkShader> MakeColorShader(SkColor); |
+ /** |
+ * Create a shader that draws the specified color (in the specified colorspace). |
+ * |
+ * This works around the limitation that SkPaint::setColor() only takes byte values, and does |
+ * not support specific colorspaces. |
+ */ |
+ static sk_sp<SkShader> MakeColorShader(const SkColor4f&, sk_sp<SkColorSpace>); |
+ |
static sk_sp<SkShader> MakeComposeShader(sk_sp<SkShader> dst, sk_sp<SkShader> src, |
SkXfermode::Mode); |