Revert "Fix artifacts on tiny stroked paths scaled up a lot."

This reverts commit 267641a90c.

Reason for revert: Seems to be turning the bots red

Original change's description:
> Fix artifacts on tiny stroked paths scaled up a lot.
> 
> Set doConsumeDegenerates to false when calling SkPath::Iter::next() for
> all paths which are not in screen space. These lines are not degenerate
> for world space paths.
> 
> Bug: skia:6987
> Change-Id: I411faf594bf8a15891bfff08691e86679b7741ac
> Reviewed-on: https://skia-review.googlesource.com/36881
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Stephen White <senorblanco@chromium.org>

TBR=bsalomon@google.com,senorblanco@chromium.org

Change-Id: I0d5a14670126ab3e0d99083a500ec8d3d0ef9961
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6987
Reviewed-on: https://skia-review.googlesource.com/37440
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Robert Phillips 2017-08-23 12:06:23 +00:00 committed by Skia Commit-Bot
parent c2bdc24795
commit 5141d215e0
5 changed files with 5 additions and 21 deletions

View File

@ -358,19 +358,3 @@ DEF_SIMPLE_GM(bug339297, canvas, 640, 480) {
paint.setStrokeWidth(1);
canvas->drawPath(path, paint);
}
DEF_SIMPLE_GM(bug6987, canvas, 200, 200) {
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);
paint.setStrokeWidth(0.0001f);
paint.setAntiAlias(true);
SkPath path;
canvas->save();
canvas->scale(50000.0f, 50000.0f);
path.moveTo(0.0005f, 0.0004f);
path.lineTo(0.0008f, 0.0010f);
path.lineTo(0.0002f, 0.0010f);
path.close();
canvas->drawPath(path, paint);
canvas->restore();
}

View File

@ -167,7 +167,7 @@ int GrPathUtils::worstCasePointCount(const SkPath& path, int* subpaths, SkScalar
SkPath::Verb verb;
SkPoint pts[4];
while ((verb = iter.next(pts, false)) != SkPath::kDone_Verb) {
while ((verb = iter.next(pts)) != SkPath::kDone_Verb) {
switch (verb) {
case SkPath::kLine_Verb:

View File

@ -711,7 +711,7 @@ void path_to_contours(const SkPath& path, SkScalar tolerance, const SkRect& clip
}
SkAutoConicToQuads converter;
SkPath::Verb verb;
while ((verb = iter.next(pts, false)) != SkPath::kDone_Verb) {
while ((verb = iter.next(pts)) != SkPath::kDone_Verb) {
switch (verb) {
case SkPath::kConic_Verb: {
SkScalar weight = iter.conicWeight();

View File

@ -148,7 +148,7 @@ public:
bool done = false;
while (!done) {
SkPath::Verb verb = iter.next(pts, false);
SkPath::Verb verb = iter.next(pts);
switch (verb) {
case SkPath::kMove_Verb:
this->moveTo(pts[0]);

View File

@ -289,7 +289,7 @@ private:
SkPath::Verb verb;
SkPoint pts[4];
while ((verb = iter.next(pts, false)) != SkPath::kDone_Verb) {
while ((verb = iter.next(pts)) != SkPath::kDone_Verb) {
switch (verb) {
case SkPath::kLine_Verb:
linePointCount += 1;
@ -508,7 +508,7 @@ private:
bool done = false;
while (!done) {
SkPath::Verb verb = iter.next(pts, false);
SkPath::Verb verb = iter.next(pts);
switch (verb) {
case SkPath::kMove_Verb:
if (!first) {