[OpenJDK 2D-Dev] X11 uniform scaled wide lines and dashed lines; STROKE_CONTROL in Pisces
Denis Lila
dlila at redhat.com
Wed Dec 8 21:54:21 UTC 2010
Hi Jim.
> > How about "if the 3 segments of the control polygon are all close to
> > each other in length and angle", then the optimization applies. Is
> > that easy to test?
>
> Hmm, that would actually be extremely easy to test and it would cost
> almost nothing. We already compute the control polygon lengths in onLeaf, and
> we're already assuming that every leaf is "flat enough", so we
> probably don't even need to check the angles. Comparing lengths should be good
> enough.
> I'll try this out.
I implemented this and updated the webrev. I tested on a few curves with very high
and very low accelerations. The results were identical to what I used to get
without this optimization. When the curve has no acceleration, all calls of getTCloseTo
are skipped.
Regards,
Denis.
More information about the 2d-dev
mailing list