aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/fatpathfill.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-03-23 18:59:25 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-23 18:59:25 -0700
commite8f3062a36d3682f4019309a32b5b84dc9eddf8c (patch)
treeff5cd50c65edb6e3b77f77327165ad0162557137 /gm/fatpathfill.cpp
parent041c870425eb0a3e2b0cbc46581b3da2f50571d9 (diff)
switch surface to sk_sp
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1817383002 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Review URL: https://codereview.chromium.org/1817383002
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);
}