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

Unified Diff: gm/imagefilters.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/imagealphathreshold.cpp ('k') | gm/imagefiltersclipped.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefilters.cpp
diff --git a/gm/imagefilters.cpp b/gm/imagefilters.cpp
index 21ce0fef9709d25d678bcaf249b4700713dd6965..ab9ddf4098afe55d9246129c1e583c1850f304e4 100644
--- a/gm/imagefilters.cpp
+++ b/gm/imagefilters.cpp
@@ -68,9 +68,9 @@ DEF_SIMPLE_GM(imagefilters_xfermodes, canvas, 480, 480) {
static sk_sp<SkImage> make_image(SkCanvas* canvas) {
const SkImageInfo info = SkImageInfo::MakeN32Premul(100, 100);
- SkAutoTUnref<SkSurface> surface(canvas->newSurface(info));
+ auto surface(canvas->makeSurface(info));
if (!surface) {
- surface.reset(SkSurface::NewRaster(info));
+ surface = SkSurface::MakeRaster(info);
}
surface->getCanvas()->drawRect(SkRect::MakeXYWH(25, 25, 50, 50), SkPaint());
return surface->makeImageSnapshot();
« no previous file with comments | « gm/imagealphathreshold.cpp ('k') | gm/imagefiltersclipped.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698