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

Unified Diff: gm/complexclip_blur_tiled.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/color4f.cpp ('k') | gm/dftext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/complexclip_blur_tiled.cpp
diff --git a/gm/complexclip_blur_tiled.cpp b/gm/complexclip_blur_tiled.cpp
index b619e67e14b30e7234971682000718adf988de7c..9413e64e07d4cce42774486a69edc695b50897fc 100644
--- a/gm/complexclip_blur_tiled.cpp
+++ b/gm/complexclip_blur_tiled.cpp
@@ -40,9 +40,9 @@ protected:
}
int ts = SkScalarCeilToInt(tile_size);
SkImageInfo info = SkImageInfo::MakeN32Premul(ts, ts);
- SkAutoTUnref<SkSurface> tileSurface(canvas->newSurface(info));
- if (!tileSurface.get()) {
- tileSurface.reset(SkSurface::NewRaster(info));
+ auto tileSurface(canvas->makeSurface(info));
+ if (!tileSurface) {
+ tileSurface = SkSurface::MakeRaster(info);
}
SkCanvas* tileCanvas = tileSurface->getCanvas();
for (SkScalar y = bounds.top(); y < bounds.bottom(); y += tile_size) {
« no previous file with comments | « gm/color4f.cpp ('k') | gm/dftext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698