aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/fatpathfill.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/fatpathfill.cpp')
-rw-r--r--gm/fatpathfill.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/gm/fatpathfill.cpp b/gm/fatpathfill.cpp
index d76cd463ad..46e810eeb0 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);
}