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

Unified Diff: dm/DMSrcSink.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 | « bench/SkLinearBitmapPipelineBench.cpp ('k') | example/HelloWorld.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index e9211e51c2c87f72a11b6776946f539bd476ed62..b27ed8b51f65a984d3e1334c17f5462c9c93aedd 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -818,7 +818,7 @@ Error ImageGenSrc::draw(SkCanvas* canvas) const {
// We have disabled these tests in DM.cpp.
SkASSERT(kGray_8_SkColorType != gen->getInfo().colorType());
- SkAutoTDelete<SkImage> image(SkImage::NewFromGenerator(gen.release(), nullptr));
+ sk_sp<SkImage> image(SkImage::MakeFromGenerator(gen.release(), nullptr));
if (!image) {
return "Could not create image from codec image generator.";
}
@@ -1315,7 +1315,7 @@ Error ViaTiles::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkStri
mpd.draw();
for (int j = 0; j < yTiles; j++) {
for (int i = 0; i < xTiles; i++) {
- SkAutoTUnref<SkImage> image(surfaces[i+xTiles*j]->newImageSnapshot());
+ sk_sp<SkImage> image(surfaces[i+xTiles*j]->makeImageSnapshot());
canvas->drawImage(image, SkIntToScalar(i*fW), SkIntToScalar(j*fH));
}
}
« no previous file with comments | « bench/SkLinearBitmapPipelineBench.cpp ('k') | example/HelloWorld.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698