From eb75c7db3a7372de68347d0df8d58acebc33a9ad Mon Sep 17 00:00:00 2001 From: caryclark Date: Fri, 18 Mar 2016 06:04:26 -0700 Subject: allow one zero length dash If the constructed stroke that represents a dash has a single dash of length zero, and the end cap is square or round, draw the cap. The old code initialized the initial dash length to zero, making it ambiguous whether the first length is zero or not. R=robertphillips@google.com BUG=583299 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1805963002 Committed: https://skia.googlesource.com/skia/+/5e1a24808415df2748822e8082e21a361362cdfe Review URL: https://codereview.chromium.org/1805963002 --- bench/DashBench.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bench/DashBench.cpp') diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp index eb964f6bf1..e3d8364013 100644 --- a/bench/DashBench.cpp +++ b/bench/DashBench.cpp @@ -72,8 +72,9 @@ protected: SkPath path; this->makePath(&path); - paint.setPathEffect(SkDashPathEffect::Create(fIntervals.begin(), - fIntervals.count(), 0))->unref(); + SkAutoTUnref effect(SkDashPathEffect::Create(fIntervals.begin(), + fIntervals.count(), 0)); + paint.setPathEffect(effect); if (fDoClip) { SkRect r = path.getBounds(); -- cgit v1.2.3