From 477ba0c18a21e24646702c5eda6d966c75969183 Mon Sep 17 00:00:00 2001 From: mtklein Date: Mon, 26 Sep 2016 08:18:43 -0700 Subject: [PATCH] beziers: I missed an unsequenced moveTo() pair. TBR=brianosman@google.com BUG=skia: NOTREECHECKS=true GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2369933002 Review-Url: https://codereview.chromium.org/2369933002 --- gm/beziers.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gm/beziers.cpp b/gm/beziers.cpp index ffc3ba65fd..598ed62c5e 100755 --- a/gm/beziers.cpp +++ b/gm/beziers.cpp @@ -16,13 +16,15 @@ constexpr SkScalar SH = SkIntToScalar(H); static void rnd_quad(SkPath* p, SkPaint* paint, SkRandom& rand) { - p->moveTo(rand.nextRangeScalar(0, W), rand.nextRangeScalar(0, H)); + auto a = rand.nextRangeScalar(0,W), + b = rand.nextRangeScalar(0,H); + p->moveTo(a,b); for (int x = 0; x < 2; ++x) { - auto a = rand.nextRangeScalar(W/4, W), - b = rand.nextRangeScalar( 0, H), - c = rand.nextRangeScalar( 0, W), - d = rand.nextRangeScalar(H/4, H); - p->quadTo(a,b,c,d); + auto c = rand.nextRangeScalar(W/4, W), + d = rand.nextRangeScalar( 0, H), + e = rand.nextRangeScalar( 0, W), + f = rand.nextRangeScalar(H/4, H); + p->quadTo(c,d,e,f); } paint->setColor(rand.nextU()); SkScalar width = rand.nextRangeScalar(1, 5); -- 2.34.1