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

Unified Diff: gm/drawatlas.cpp

Issue 1817383002: switch surface to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/discard.cpp ('k') | gm/drawatlascolor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/drawatlas.cpp
diff --git a/gm/drawatlas.cpp b/gm/drawatlas.cpp
index 4d2f6d46f3ff6309e82e992152e47e38c3347e1f..334aba7af18d7549962a04d8c885c85ae1f85d22 100644
--- a/gm/drawatlas.cpp
+++ b/gm/drawatlas.cpp
@@ -13,9 +13,9 @@
class DrawAtlasGM : public skiagm::GM {
static sk_sp<SkImage> MakeAtlas(SkCanvas* caller, const SkRect& target) {
SkImageInfo info = SkImageInfo::MakeN32Premul(100, 100);
- SkAutoTUnref<SkSurface> surface(caller->newSurface(info));
+ auto surface(caller->makeSurface(info));
if (nullptr == surface) {
- surface.reset(SkSurface::NewRaster(info));
+ surface = SkSurface::MakeRaster(info);
}
SkCanvas* canvas = surface->getCanvas();
// draw red everywhere, but we don't expect to see it in the draw, testing the notion
« no previous file with comments | « gm/discard.cpp ('k') | gm/drawatlascolor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698