GrTessellator: speed up linearized quadratic Beziers.

Linerization of quadratic Beziers was using recursive midpoint 
subdivision, which can exceed the number of required points by
up to 2X if the second-last recursion level is just over the flatness
threshold. (This is particularly bad for circular arcs, since all
segments have a similar midpoint distance.)

Instead, compute the points of maximum curvature, and progressively 
increase the number of segments until the flatness
metric is satisfied at the points of maximum curvature.

This is good for a 15-20% boost on MotionMark Fill Paths, and makes the
performance on Canvas Arcs with the verb limit removed competitive
with the software+upload path renderer.

NOTE: this cause minor pixel diffs in a number of path-related GMs.

BUG=skia:

Change-Id: Ia2c22e00e45acec538b15a23c6edcb7a7d4566b7
Reviewed-on: https://skia-review.googlesource.com/9956
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
1 file changed