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. |