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

Unified Diff: include/core/SkShader.h

Issue 1617813002: experiment: float color components (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: now with colorshader Created 4 years, 11 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 60ef280d5ec37f8038fdec42b8820b5c3530bda5..b4876614e8d480509376edde262104e4ecc12b37 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -81,6 +81,7 @@ public:
shadeSpan().
*/
kConstInY32_Flag = 1 << 1,
+ kSupports4f_Flag = 1 << 2,
};
/**
@@ -127,6 +128,8 @@ public:
*/
virtual void shadeSpan(int x, int y, SkPMColor[], int count) = 0;
+ virtual void shadeSpan4f(int x, int y, SkPM4f[], int count);
+
/**
* The const void* ctx is only const because all the implementations are const.
* This can be changed to non-const if a new shade proc needs to change the ctx.
@@ -331,6 +334,8 @@ public:
*/
static SkShader* CreateColorShader(SkColor);
+ static SkShader* CreateColorShader(const SkColor4f&);
+
/** Call this to create a new shader that will draw with the specified bitmap.
*
* If the bitmap cannot be used (e.g. has no pixels, or its dimensions

Powered by Google App Engine
This is Rietveld 408576698