GrTessellator (AA): restore rounding in Line::intersect().

I removed this in https://skia-review.googlesource.com/8028, but that
was actually just masking a problem properly fixed in
https://skia-review.googlesource.com/8364. Now that it is fixed, we
can restore the rounding, which actually improves performance by
5-10% on Canvas Arcs (when run with the tess verb limit disabled).

NOTE: this change will affect many GMs, including strokes_poly,
addarc, parsedpaths, dashcubics, beziers, nested_aa, etc.

BUG=skia:

Change-Id: Id10f82e35a344247cab27e6d59a0dd2e11c9944d
Reviewed-on: https://skia-review.googlesource.com/9051
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Stephen White 2017-03-02 10:35:56 -05:00 committed by Skia Commit-Bot
parent c31858bcba
commit b56dedf70b

View File

@ -287,6 +287,7 @@ struct Line {
double scale = 1.0f / denom;
point->fX = SkDoubleToScalar((fB * other.fC - other.fB * fC) * scale);
point->fY = SkDoubleToScalar((other.fA * fC - fA * other.fC) * scale);
round(point);
return true;
}
double fA, fB, fC;