Index: src/effects/SkPixelXorXfermode.cpp |
diff --git a/src/effects/SkPixelXorXfermode.cpp b/src/effects/SkPixelXorXfermode.cpp |
index 2a6ac47aac4fb8e34a948ed2c8debeefd9cf9947..3f9aae333135d74a867ab362207340a210b00c8f 100644 |
--- a/src/effects/SkPixelXorXfermode.cpp |
+++ b/src/effects/SkPixelXorXfermode.cpp |
@@ -12,6 +12,7 @@ |
#include "SkReadBuffer.h" |
#include "SkWriteBuffer.h" |
#include "SkString.h" |
+#include "SkValue.h" |
// we always return an opaque color, 'cause I don't know what to do with |
// the alpha-component and still return a valid premultiplied color. |
@@ -35,3 +36,11 @@ void SkPixelXorXfermode::toString(SkString* str) const { |
str->appendHex(fOpColor); |
} |
#endif |
+ |
+enum { kOpColor }; |
mtklein
2016/01/21 17:46:19
?
hal.canary
2016/01/21 18:35:21
forgot that one. good catch
|
+ |
+SkValue SkPixelXorXfermode::asValue() const { |
+ auto value = SkValue::Object(SkValue::PixelXorXfermode); |
+ value.set(kOpColor, SkValue::FromU32(SkToU32(fOpColor))); |
+ return value; |
+} |