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

Unified Diff: gm/dftext.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/complexclip_blur_tiled.cpp ('k') | gm/discard.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/dftext.cpp
diff --git a/gm/dftext.cpp b/gm/dftext.cpp
index 545911c26c065c493f948b41cc31521a6807a439..0d5b1ff4e992eacf9035f7c8862cd1d5b78ccf68 100644
--- a/gm/dftext.cpp
+++ b/gm/dftext.cpp
@@ -51,9 +51,8 @@ protected:
SkImageInfo info = SkImageInfo::MakeN32Premul(onISize());
SkSurfaceProps props(SkSurfaceProps::kUseDeviceIndependentFonts_Flag,
SkSurfaceProps::kLegacyFontHost_InitType);
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(ctx, SkBudgeted::kNo,
- info, 0, &props));
- SkCanvas* canvas = surface.get() ? surface->getCanvas() : inputCanvas;
+ auto surface(SkSurface::MakeRenderTarget(ctx, SkBudgeted::kNo, info, 0, &props));
+ SkCanvas* canvas = surface ? surface->getCanvas() : inputCanvas;
// init our new canvas with the old canvas's matrix
canvas->setMatrix(inputCanvas->getTotalMatrix());
#else
« no previous file with comments | « gm/complexclip_blur_tiled.cpp ('k') | gm/discard.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698