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

Unified Diff: gm/surface.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 | « gm/resizeimagefilter.cpp ('k') | gm/textblobmixedsizes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/surface.cpp
diff --git a/gm/surface.cpp b/gm/surface.cpp
index 6874b5bea32e8ab4962a15e4276bb8f1533cfdf1..c817f8d63aba2692fdc52b9b4a6d80522a9d3f3d 100644
--- a/gm/surface.cpp
+++ b/gm/surface.cpp
@@ -140,7 +140,7 @@ protected:
}
drawInto(surf->getCanvas());
- SkAutoTUnref<SkImage> image(surf->newImageSnapshot());
+ sk_sp<SkImage> image(surf->makeImageSnapshot());
canvas->drawImage(image, 10, 10, nullptr);
SkAutoTUnref<SkSurface> surf2(surf->newSurface(info));
@@ -149,8 +149,8 @@ protected:
// Assert that the props were communicated transitively through the first image
SkASSERT(equal(surf->props(), surf2->props()));
- SkAutoTUnref<SkImage> image2(surf2->newImageSnapshot());
- canvas->drawImage(image2, 10 + SkIntToScalar(image->width()) + 10, 10, nullptr);
+ sk_sp<SkImage> image2(surf2->makeImageSnapshot());
+ canvas->drawImage(image2.get(), 10 + SkIntToScalar(image->width()) + 10, 10, nullptr);
}
private:
« no previous file with comments | « gm/resizeimagefilter.cpp ('k') | gm/textblobmixedsizes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698