Index: src/pdf/SkPDFDevice.cpp |
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp |
index 514cd8840897c9a84312ce5c6da0186e9605ee06..66048ff751f0210418d411043d4a3f3b09326037 100644 |
--- a/src/pdf/SkPDFDevice.cpp |
+++ b/src/pdf/SkPDFDevice.cpp |
@@ -2114,8 +2114,7 @@ static SkSize rect_to_size(const SkRect& r) { |
return SkSize::Make(r.width(), r.height()); |
} |
-static const SkImage* color_filter(const SkImage* image, |
- SkColorFilter* colorFilter) { |
+static const SkImage* color_filter(const SkImage* image, SkColorFilter* colorFilter) { |
sk_sp<SkSurface> surface(SkSurface::NewRaster( |
SkImageInfo::MakeN32Premul(image->dimensions()))); |
if (!surface) { |
@@ -2124,7 +2123,7 @@ static const SkImage* color_filter(const SkImage* image, |
SkCanvas* canvas = surface->getCanvas(); |
canvas->clear(SK_ColorTRANSPARENT); |
SkPaint paint; |
- paint.setColorFilter(colorFilter); |
+ paint.setColorFilter(sk_ref_sp(colorFilter)); |
canvas->drawImage(image, 0, 0, &paint); |
canvas->flush(); |
return surface->makeImageSnapshot().release(); |