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/fatpathfill.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/drawminibitmaprect.cpp ('k') | gm/filterfastbounds.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/fatpathfill.cpp
diff --git a/gm/fatpathfill.cpp b/gm/fatpathfill.cpp
index d76cd463add59c4b79c802367c60fa68463d43d4..46e810eeb040019f5d389a170dfc4c9442ee7e92 100644
--- a/gm/fatpathfill.cpp
+++ b/gm/fatpathfill.cpp
@@ -15,8 +15,8 @@
#define SMALL_H 3
#define REPEAT_LOOP 5
-static SkSurface* new_surface(int width, int height) {
- return SkSurface::NewRasterN32Premul(width, height);
+static sk_sp<SkSurface> new_surface(int width, int height) {
+ return SkSurface::MakeRasterN32Premul(width, height);
}
static void draw_pixel_centers(SkCanvas* canvas) {
@@ -49,7 +49,7 @@ static void draw_fatpath(SkCanvas* canvas, SkSurface* surface, const SkPath& pat
DEF_SIMPLE_GM(fatpathfill, canvas,
SMALL_W * ZOOM,
SMALL_H * ZOOM * REPEAT_LOOP) {
- SkAutoTUnref<SkSurface> surface(new_surface(SMALL_W, SMALL_H));
+ auto surface(new_surface(SMALL_W, SMALL_H));
canvas->scale(ZOOM, ZOOM);
@@ -62,7 +62,7 @@ DEF_SIMPLE_GM(fatpathfill, canvas,
line.moveTo(1, 2);
line.lineTo(SkIntToScalar(4 + i), 1);
paint.getFillPath(line, &path);
- draw_fatpath(canvas, surface, path);
+ draw_fatpath(canvas, surface.get(), path);
canvas->translate(0, SMALL_H);
}
« no previous file with comments | « gm/drawminibitmaprect.cpp ('k') | gm/filterfastbounds.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698