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

Unified Diff: gm/drawatlascolor.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/drawatlas.cpp ('k') | gm/drawbitmaprect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/drawatlascolor.cpp
diff --git a/gm/drawatlascolor.cpp b/gm/drawatlascolor.cpp
index 85a7a9473adad7f8a964655f12cc9428c8ff9382..e8fd23608cb9b279778bc06c216ad607db7aa58d 100644
--- a/gm/drawatlascolor.cpp
+++ b/gm/drawatlascolor.cpp
@@ -19,9 +19,9 @@ static sk_sp<SkImage> make_atlas(SkCanvas* caller, int atlasSize) {
const int kBlockSize = atlasSize/2;
SkImageInfo info = SkImageInfo::MakeN32Premul(atlasSize, atlasSize);
- 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();
« no previous file with comments | « gm/drawatlas.cpp ('k') | gm/drawbitmaprect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698