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

Unified Diff: src/core/SkPictureImageGenerator.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/c/sk_surface.cpp ('k') | src/image/SkImage_Base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureImageGenerator.cpp
diff --git a/src/core/SkPictureImageGenerator.cpp b/src/core/SkPictureImageGenerator.cpp
index 67834876ca4761f71fc40f63008d8d85d3537e86..f90ac0f1eea5c8072587ffcbcf4c2486810a6276 100644
--- a/src/core/SkPictureImageGenerator.cpp
+++ b/src/core/SkPictureImageGenerator.cpp
@@ -151,8 +151,8 @@ GrTexture* SkPictureImageGenerator::onGenerateTexture(GrContext* ctx, const SkIR
}
surface->getCanvas()->clear(0); // does NewRenderTarget promise to do this for us?
surface->getCanvas()->drawPicture(fPicture, &matrix, fPaint.getMaybeNull());
- SkAutoTUnref<SkImage> image(surface->newImageSnapshot());
- if (!image.get()) {
+ sk_sp<SkImage> image(surface->makeImageSnapshot());
+ if (!image) {
return nullptr;
}
return SkSafeRef(as_IB(image)->peekTexture());
« no previous file with comments | « src/c/sk_surface.cpp ('k') | src/image/SkImage_Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698