Index: src/effects/SkPixelXorXfermode.cpp |
diff --git a/src/effects/SkPixelXorXfermode.cpp b/src/effects/SkPixelXorXfermode.cpp |
index 2a6ac47aac4fb8e34a948ed2c8debeefd9cf9947..8e13b2250cab2d5bff2e4cd27b68715a9d8b37ed 100644 |
--- a/src/effects/SkPixelXorXfermode.cpp |
+++ b/src/effects/SkPixelXorXfermode.cpp |
@@ -12,6 +12,8 @@ |
#include "SkReadBuffer.h" |
#include "SkWriteBuffer.h" |
#include "SkString.h" |
+#include "SkValue.h" |
+#include "SkValueKeys.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 +37,10 @@ void SkPixelXorXfermode::toString(SkString* str) const { |
str->appendHex(fOpColor); |
} |
#endif |
+ |
+SkValue SkPixelXorXfermode::asValue() const { |
+ auto value = SkValue::Object(SkValue::PixelXorXfermode); |
+ value.set(SkValueKeys::PixelXorXfermode::kOpColor, |
+ SkValue::FromU32(SkToU32(fOpColor))); |
+ return value; |
+} |