Index: src/core/SkBlitter.cpp |
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp |
index 04897e3828af4ec077ec27102e88b279437969a8..15562168e990a5bbb5eb5fef9b1f1da4c03b8d8e 100644 |
--- a/src/core/SkBlitter.cpp |
+++ b/src/core/SkBlitter.cpp |
@@ -844,7 +844,8 @@ |
if (SkXfermode::IsMode(mode, SkXfermode::kClear_Mode)) { |
SkPaint* p = paint.writable(); |
shader = p->setShader(nullptr); |
- cf = p->setColorFilter(nullptr); |
+ p->setColorFilter(nullptr); |
+ cf = nullptr; |
mode = p->setXfermodeMode(SkXfermode::kSrc_Mode); |
p->setColor(0); |
} |
@@ -867,7 +868,7 @@ |
if (cf) { |
SkASSERT(shader); |
- paint.writable()->setShader(shader->makeWithColorFilter(cf)); |
+ paint.writable()->setShader(shader->makeWithColorFilter(sk_ref_sp(cf))); |
shader = paint->getShader(); |
// blitters should ignore the presence/absence of a filter, since |
// if there is one, the shader will take care of it. |