Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 1821103004: Revert of Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkTableColorFilter.cpp ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDevice.cpp
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 66048ff751f0210418d411043d4a3f3b09326037..514cd8840897c9a84312ce5c6da0186e9605ee06 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -2114,7 +2114,8 @@
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) {
@@ -2123,7 +2124,7 @@
SkCanvas* canvas = surface->getCanvas();
canvas->clear(SK_ColorTRANSPARENT);
SkPaint paint;
- paint.setColorFilter(sk_ref_sp(colorFilter));
+ paint.setColorFilter(colorFilter);
canvas->drawImage(image, 0, 0, &paint);
canvas->flush();
return surface->makeImageSnapshot().release();
« no previous file with comments | « src/effects/SkTableColorFilter.cpp ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698