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

Unified Diff: include/gpu/GrColor.h

Issue 2324553002: Push usage of GrColor4f into OverrideInput (Closed)
Patch Set: Remove TODO comment Created 4 years, 3 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 | « no previous file | include/gpu/GrFragmentProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrColor.h
diff --git a/include/gpu/GrColor.h b/include/gpu/GrColor.h
index 911b18fc16024cf44381006fbce4f25346db1f7d..f52671732a8e9f6b57924f517eb84a6fa69a4b37 100644
--- a/include/gpu/GrColor.h
+++ b/include/gpu/GrColor.h
@@ -195,6 +195,17 @@ struct GrColor4f {
return GrColor4f(color.fR, color.fG, color.fB, color.fA);
}
+ bool operator==(const GrColor4f& other) const {
+ return
+ fRGBA[0] == other.fRGBA[0] &&
+ fRGBA[1] == other.fRGBA[1] &&
+ fRGBA[2] == other.fRGBA[2] &&
+ fRGBA[3] == other.fRGBA[3];
+ }
+ bool operator!=(const GrColor4f& other) const {
+ return !(*this == other);
+ }
+
GrColor toGrColor() const {
return GrColorPackRGBA(
SkTPin<unsigned>(static_cast<unsigned>(fRGBA[0] * 255.0f + 0.5f), 0, 255),
« no previous file with comments | « no previous file | include/gpu/GrFragmentProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698