From 5381b81af2127cc1bc2697ab168dadb13db9c5c5 Mon Sep 17 00:00:00 2001 From: robertphillips Date: Thu, 28 Jan 2016 08:50:26 -0800 Subject: [PATCH] Fix SkPixelXorXfermode serialization bug GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1647963002 Review URL: https://codereview.chromium.org/1647963002 --- src/effects/SkPixelXorXfermode.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/effects/SkPixelXorXfermode.cpp b/src/effects/SkPixelXorXfermode.cpp index a9316cc55e..e0ae146dda 100644 --- a/src/effects/SkPixelXorXfermode.cpp +++ b/src/effects/SkPixelXorXfermode.cpp @@ -21,7 +21,9 @@ SkPMColor SkPixelXorXfermode::xferColor(SkPMColor src, SkPMColor dst) const { } void SkPixelXorXfermode::flatten(SkWriteBuffer& wb) const { - wb.writeColor(fOpColor); + wb.writeColor(SkColorSetRGB(SkGetPackedR32(fOpColor), + SkGetPackedG32(fOpColor), + SkGetPackedB32(fOpColor))); } SkFlattenable* SkPixelXorXfermode::CreateProc(SkReadBuffer& buffer) {