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

Unified Diff: include/core/SkLights.h

Issue 2239933004: LightingFP now supports multiple directional lights (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Resolved rebase conflicts Created 4 years, 4 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/SkLights.h
diff --git a/include/core/SkLights.h b/include/core/SkLights.h
index d9ec65b9aafe59f8766fcad3bda7f4ef9683b37e..329e5d387dc926b2a7ca709377c753fb576e52d6 100644
--- a/include/core/SkLights.h
+++ b/include/core/SkLights.h
@@ -87,6 +87,20 @@ public:
fShadowMap = b.fShadowMap;
return *this;
}
+
+ bool operator== (const Light& b) {
+ if (this == &b) {
+ return true;
+ }
+
+ return (fColor == b.fColor) &&
+ (fType == b.fType) &&
+ (fDirection == b.fDirection) &&
+ (fShadowMap == b.fShadowMap);
+ }
+
+ bool operator!= (const Light& b) { return !(this->operator==(b)); }
+
private:
LightType fType;
SkColor3f fColor; // linear (unpremul) color. Range is 0..1 in each channel.

Powered by Google App Engine
This is Rietveld 408576698