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

Unified Diff: include/gpu/GrPaint.h

Issue 2088303002: Add GrColor4f type, store that in GrPaint. Linearize based on global flag. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix conversion to SkColor4f with new channel order Created 4 years, 6 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
« no previous file with comments | « include/gpu/GrColor.h ('k') | src/gpu/GrPaint.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrPaint.h
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h
index af408488d7b8d003270f67b1f9edeaa29ead164c..70067ae4491b418f4dfec03c17eafb313d05ee46 100644
--- a/include/gpu/GrPaint.h
+++ b/include/gpu/GrPaint.h
@@ -48,8 +48,13 @@ public:
/**
* The initial color of the drawn primitive. Defaults to solid white.
*/
- void setColor(GrColor color) { fColor = color; }
- GrColor getColor() const { return fColor; }
+ void setColor4f(const GrColor4f& color) { fColor = color; }
+ const GrColor4f& getColor4f() const { return fColor; }
+
+ /**
+ * Legacy getter, until all code handles 4f directly.
+ */
+ GrColor getColor() const { return fColor.toGrColor(); }
/**
* Should primitives be anti-aliased or not. Defaults to false.
@@ -162,7 +167,7 @@ private:
bool fDisableOutputConversionToSRGB;
bool fAllowSRGBInputs;
- GrColor fColor;
+ GrColor4f fColor;
};
#endif
« no previous file with comments | « include/gpu/GrColor.h ('k') | src/gpu/GrPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698