diff options
author | 2017-12-19 20:20:13 +0000 | |
---|---|---|
committer | 2017-12-19 20:20:17 +0000 | |
commit | 394197d064d976675a7952857ed5ee98e0c9edca (patch) | |
tree | c9063a5e320ea18d19d86e275cd1c7dcb978b220 /gm/strokes.cpp | |
parent | b0abd8502b350a67d6c6568c08ca1215567be2f6 (diff) |
Revert "efficiently dash very large rectangles and very long lines"
This reverts commit 1ad81981b0027e96ef0cecd78661ab2c22bdc4aa.
Reason for revert: broke chrome layout tests
Original change's description:
> efficiently dash very large rectangles and very long lines
>
> Speed up dashing when lines and rects are absurdly large.
>
> Prior to this CL, only horizontal lines were detected.
>
> The onOnceBeforeDraw changes are there to make debugging easier.
>
> Also folded in a change to handle dashing of zero length lines.
>
> R=​reed@google.com, egdaniel@google.com
> Bug: skia:7311
> Change-Id: Ia16fb124c7a78a5cc639e612fae29c879a37da1a
> Reviewed-on: https://skia-review.googlesource.com/84862
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Reviewed-by: Mike Reed <reed@google.com>
TBR=egdaniel@google.com,reed@google.com,caryclark@skia.org
Change-Id: I5e8f04c54486f8cd1a931f6cade92feaaa4a7647
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7311
Reviewed-on: https://skia-review.googlesource.com/87282
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Diffstat (limited to 'gm/strokes.cpp')
-rw-r--r-- | gm/strokes.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/gm/strokes.cpp b/gm/strokes.cpp index e9faad4d6c..ed13d090ff 100644 --- a/gm/strokes.cpp +++ b/gm/strokes.cpp @@ -533,31 +533,3 @@ DEF_SIMPLE_GM(zerolinedash, canvas, 256, 256) { canvas->drawLine(100, 100, 100, 100, paint); } - -DEF_SIMPLE_GM(longrect_dash, canvas, 250, 250) { - canvas->clear(SK_ColorWHITE); - - SkPaint paint; - paint.setColor(SkColorSetARGB(255, 0, 0, 0)); - paint.setStrokeWidth(5); - paint.setStrokeCap(SkPaint::kRound_Cap); - paint.setStrokeJoin(SkPaint::kBevel_Join); - paint.setStyle(SkPaint::kStroke_Style); - SkScalar dash_pattern[] = {1, 5}; - paint.setPathEffect(SkDashPathEffect::Make(dash_pattern, 2, 0)); - // try all combinations of stretching bounds - for (auto left : { 20.f, -100001.f } ) { - for (auto top : { 20.f, -100001.f } ) { - for (auto right : { 40.f, 100001.f } ) { - for (auto bottom : { 40.f, 100001.f } ) { - canvas->save(); - canvas->clipRect({10, 10, 50, 50}); - canvas->drawRect({left, top, right, bottom}, paint); - canvas->restore(); - canvas->translate(60, 0); - } - } - canvas->translate(-60 * 4, 60); - } - } -} |