aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/dashing.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-06-29 12:27:48 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-29 16:56:49 +0000
commit5fb30566b40c2d936341dd6187c94e5ab00f4c58 (patch)
tree61275d0c8569d9a7d149f1aa3bc695c20258aed6 /gm/dashing.cpp
parentb8d88d72cbe9cc3dde91eaf58e928b34748526a7 (diff)
Fix gpu dashing for case when circle dashes are large enough to overlap
Bug: skia: Change-Id: I7153b28103c5ca0947c37d57357b64bf2aa884e5 Reviewed-on: https://skia-review.googlesource.com/20979 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'gm/dashing.cpp')
-rw-r--r--gm/dashing.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/gm/dashing.cpp b/gm/dashing.cpp
index b527fbf987..ff6e700b02 100644
--- a/gm/dashing.cpp
+++ b/gm/dashing.cpp
@@ -332,7 +332,7 @@ protected:
return SkString("dashing4");
}
- SkISize onISize() { return SkISize::Make(640, 950); }
+ SkISize onISize() { return SkISize::Make(640, 1050); }
virtual void onDraw(SkCanvas* canvas) {
constexpr struct {
@@ -397,6 +397,18 @@ protected:
drawline(canvas, 32, 16, paint, 8.f, 0.f, 40.f);
canvas->translate(0, SkIntToScalar(20));
}
+
+ // Test overlapping circles.
+ canvas->translate(SkIntToScalar(5), SkIntToScalar(20));
+ paint.setAntiAlias(true);
+ paint.setStrokeCap(SkPaint::kRound_Cap);
+ paint.setColor(0x44000000);
+ paint.setStrokeWidth(40);
+ drawline(canvas, 0, 30, paint);
+
+ canvas->translate(0, SkIntToScalar(50));
+ paint.setStrokeCap(SkPaint::kSquare_Cap);
+ drawline(canvas, 0, 30, paint);
}
};