diff options
Diffstat (limited to 'src/core/SkXfermode.cpp')
-rw-r--r-- | src/core/SkXfermode.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp index 79de322c2d..ad477e1215 100644 --- a/src/core/SkXfermode.cpp +++ b/src/core/SkXfermode.cpp @@ -15,6 +15,8 @@ #include "SkReadBuffer.h" #include "SkString.h" #include "SkWriteBuffer.h" +#include "SkValue.h" +#include "SkValueKeys.h" #define SkAlphaMulAlpha(a, b) SkMulDiv255Round(a, b) @@ -763,6 +765,12 @@ void SkProcCoeffXfermode::flatten(SkWriteBuffer& buffer) const { buffer.write32(fMode); } +SkValue SkProcCoeffXfermode::asValue() const { + auto value = SkValue::Object(SkValue::ProcCoeffXfermode); + value.set(SkValueKeys::ProcCoeffXfermode::kMode, SkValue::FromU32(SkToU32(fMode))); + return value; +} + bool SkProcCoeffXfermode::asMode(Mode* mode) const { if (mode) { *mode = fMode; @@ -1071,3 +1079,5 @@ bool SkXfermode::IsOpaque(const SkXfermode* xfer, SrcColorOpacity opacityType) { SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END + +SkValue SkXfermode::asValue() const { return SkValue(); } |