aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/dashing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/dashing.cpp')
-rw-r--r--gm/dashing.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gm/dashing.cpp b/gm/dashing.cpp
index dfd1b629c1..c728d15a1a 100644
--- a/gm/dashing.cpp
+++ b/gm/dashing.cpp
@@ -21,7 +21,8 @@ static void drawline(SkCanvas* canvas, int on, int off, const SkPaint& paint,
SkIntToScalar(off),
};
- p.setPathEffect(SkDashPathEffect::Create(intervals, 2, phase))->unref();
+ SkAutoTUnref<SkPathEffect> effect(SkDashPathEffect::Create(intervals, 2, phase));
+ p.setPathEffect(effect);
canvas->drawLine(startX, startY, finalX, finalY, p);
}