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()); |