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

Unified Diff: gm/discard.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/dftext.cpp ('k') | gm/drawatlas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/discard.cpp
diff --git a/gm/discard.cpp b/gm/discard.cpp
index 6f64b9c0b99d4a966b499065c185753f0dcbcbd2..d75f0ab1418a99389d9ff3cae27a6021ed511dcc 100644
--- a/gm/discard.cpp
+++ b/gm/discard.cpp
@@ -45,8 +45,7 @@ protected:
size.fWidth /= 10;
size.fHeight /= 10;
SkImageInfo info = SkImageInfo::MakeN32Premul(size);
- SkSurface* surface = SkSurface::NewRenderTarget(context, SkBudgeted::kNo, info);
-
+ auto surface = SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info);
if (nullptr == surface) {
return;
}
@@ -78,7 +77,6 @@ protected:
}
surface->getCanvas()->discard();
- surface->unref();
}
private:
« no previous file with comments | « gm/dftext.cpp ('k') | gm/drawatlas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698