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

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 1810813003: update callsites for Make image factories (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: start to take advantage of sk_sp drawImage 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/pdf/SkPDFCanon.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 443bb1aedfd5d2a06e8a271438c709729defab2c..6e0dd4b7c73a0d9d6981428bc88bfac262f14fd9 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -1160,7 +1160,7 @@ void SkPDFDevice::drawImageRect(const SkDraw& draw,
SkIRect srcIR;
tmpSrc.roundOut(&srcIR);
- autoImageUnref.reset(image->newSubset(srcIR));
+ autoImageUnref = image->makeSubset(srcIR);
if (!autoImageUnref) {
return;
}
@@ -2187,7 +2187,7 @@ static const SkImage* color_filter(const SkImage* image,
paint.setColorFilter(colorFilter);
canvas->drawImage(image, 0, 0, &paint);
canvas->flush();
- return surface->newImageSnapshot();
+ return surface->makeImageSnapshot().release();
}
////////////////////////////////////////////////////////////////////////////////
@@ -2207,7 +2207,7 @@ void SkPDFDevice::internalDrawImage(const SkMatrix& origMatrix,
sk_sp<const SkImage> autoImageUnref;
if (srcRect) {
- autoImageUnref.reset(image->newSubset(*srcRect));
+ autoImageUnref = image->makeSubset(*srcRect);
if (!autoImageUnref) {
return;
}
@@ -2286,7 +2286,7 @@ void SkPDFDevice::internalDrawImage(const SkMatrix& origMatrix,
clipRegion = &perspectiveBounds;
srcRect = nullptr;
- autoImageUnref.reset(surface->newImageSnapshot());
+ autoImageUnref.reset(surface->makeImageSnapshot().release());
image = autoImageUnref.get();
}
« no previous file with comments | « src/pdf/SkPDFCanon.cpp ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698