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

Unified Diff: ui/gfx/color_transform.h

Issue 2697253002: color: Add support for shader generation (Closed)
Patch Set: Rebase Created 3 years, 10 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: ui/gfx/color_transform.h
diff --git a/ui/gfx/color_transform.h b/ui/gfx/color_transform.h
index 5368b7a6a7bb956cc0ae6fed292b1b5cf09e2975..c72ebe96b42a53598fdb1537d27539d34010b03c 100644
--- a/ui/gfx/color_transform.h
+++ b/ui/gfx/color_transform.h
@@ -26,6 +26,14 @@ class GFX_EXPORT ColorTransform {
// Perform transformation of colors, |colors| is both input and output.
virtual void Transform(TriStim* colors, size_t num) = 0;
+ // Return GLSL shader source that defines a function DoColorConversion that
+ // converts a vec3 according to this transform.
+ virtual bool CanGetShaderSource() const = 0;
+ virtual std::string GetShaderSource() const = 0;
+
+ // Returns true if this transform is the identity.
+ virtual bool IsIdentity() const = 0;
+
virtual size_t NumberOfStepsForTesting() const = 0;
static std::unique_ptr<ColorTransform> NewColorTransform(

Powered by Google App Engine
This is Rietveld 408576698