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

Unified Diff: gm/imagealphathreshold.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/image_shader.cpp ('k') | gm/imagefilters.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagealphathreshold.cpp
diff --git a/gm/imagealphathreshold.cpp b/gm/imagealphathreshold.cpp
index eafc32f8d62706aea64d7b26b4ce9b1960c52a75..8d65cf8ee756d71cf1b51c0ff48967ed62baf054 100644
--- a/gm/imagealphathreshold.cpp
+++ b/gm/imagealphathreshold.cpp
@@ -95,9 +95,9 @@ protected:
void onDraw(SkCanvas* canvas) override {
SkImageInfo info = SkImageInfo::MakeN32(WIDTH, HEIGHT, kOpaque_SkAlphaType);
- SkAutoTUnref<SkSurface> surface(canvas->newSurface(info));
+ auto surface(canvas->makeSurface(info));
if (nullptr == surface) {
- surface.reset(SkSurface::NewRaster(info));
+ surface = SkSurface::MakeRaster(info);
}
surface->getCanvas()->clear(SK_ColorWHITE);
draw_rects(surface->getCanvas());
« no previous file with comments | « gm/image_shader.cpp ('k') | gm/imagefilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698