aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/strokefill.cpp
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-12-05 10:05:21 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-05 18:06:18 +0000
commita32a3c32c32e02baecffb537f6f26c0a67a1c130 (patch)
tree049aceb1e15505619f39caf74f305d0d50db98dc /gm/strokefill.cpp
parentf32b27d2e4872966a360fb296acccae3e186a4a5 (diff)
Add analytic clip FPs that read from the CCPR atlas
Bug: skia:7190 Change-Id: Ie31d368f52910e6917efdeb1b024370b06fc11ee Reviewed-on: https://skia-review.googlesource.com/77160 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'gm/strokefill.cpp')
-rw-r--r--gm/strokefill.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/gm/strokefill.cpp b/gm/strokefill.cpp
index 2e96cd7c36..b28b415948 100644
--- a/gm/strokefill.cpp
+++ b/gm/strokefill.cpp
@@ -359,6 +359,34 @@ DEF_SIMPLE_GM(bug339297, canvas, 640, 480) {
canvas->drawPath(path, paint);
}
+DEF_SIMPLE_GM(bug339297_as_clip, canvas, 640, 480) {
+ SkPath path;
+ path.moveTo(-469515, -10354890);
+ path.cubicTo(771919.62f, -10411179, 2013360.1f, -10243774, 3195542.8f, -9860664);
+ path.lineTo(3195550, -9860655);
+ path.lineTo(3195539, -9860652);
+ path.lineTo(3195539, -9860652);
+ path.lineTo(3195539, -9860652);
+ path.cubicTo(2013358.1f, -10243761, 771919.25f, -10411166, -469513.84f, -10354877);
+ path.lineTo(-469515, -10354890);
+ path.close();
+
+ canvas->translate(258, 10365663);
+
+ canvas->save();
+ canvas->clipPath(path, true);
+ canvas->clear(SK_ColorBLACK);
+ canvas->restore();
+
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kFill_Style);
+ paint.setColor(SK_ColorRED);
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(1);
+ canvas->drawPath(path, paint);
+}
+
DEF_SIMPLE_GM(bug6987, canvas, 200, 200) {
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);