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

Unified Diff: src/pdf/SkPDFCanon.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/image/SkSurface_Raster.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFCanon.cpp
diff --git a/src/pdf/SkPDFCanon.cpp b/src/pdf/SkPDFCanon.cpp
index d7aea8ad69ff976128c83150d3a9345991eee259..48f3aef69e411c675aa752c481eca1396cfa0dc9 100644
--- a/src/pdf/SkPDFCanon.cpp
+++ b/src/pdf/SkPDFCanon.cpp
@@ -142,12 +142,12 @@ const SkImage* SkPDFCanon::bitmapToImage(const SkBitmap& bm) {
if (const SkImage** img = fBitmapToImageMap.find(key)) {
return *img;
}
- if (SkImage* image = SkImage::NewFromBitmap(bm)) {
+ if (SkImage* image = SkImage::MakeFromBitmap(bm).release()) {
return *fBitmapToImageMap.set(key, image);
}
SkBitmap n32bitmap; // SkImage::NewFromBitmap can be finicky.
bm.copyTo(&n32bitmap, kN32_SkColorType);
- return *fBitmapToImageMap.set(key, SkImage::NewFromBitmap(n32bitmap));
+ return *fBitmapToImageMap.set(key, SkImage::MakeFromBitmap(n32bitmap).release());
}
sk_sp<SkPDFStream> SkPDFCanon::makeInvertFunction() {
« no previous file with comments | « src/image/SkSurface_Raster.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698