[OpenJDK 2D-Dev] Various fixes to pisces stroke widening code

Denis Lila dlila at redhat.com
Thu Aug 5 22:58:41 UTC 2010


Hi Jim.

I didn't know about Java2Demo. If I did I would have run it sooner.
But I ran it a few hours ago, and everything looked fine (surprisingly 
high fps too) until I got to the append test.

Apparently I introduced a bug when solving the "2 consecutive moveTos bug".
Basically, when there's a close() after a horizontal lineTo(), the lineTo
in close() won't be executed because it's inside the if (firstOrientation != 0)
test. So instead of going back to the starting point, close will stay where
it is, which will draw a triangle above the rectangle.

I fixed this by introducing a variable that keeps track of the last method
called (lineTo, moveTo, or close), and instead of checking for firstOrientation != 0
in close(), I check for (last == LINE_TO).

webrev (hopefully final):
http://icedtea.classpath.org/~dlila/webrevs/fpBetterAAv2/webrev/

I'm sorry about this. I wish I had known about Java2Demo sooner.

Thanks,
Denis. 

----- "Jim Graham" <james.graham at oracle.com> wrote:

> Hi Denis,
> 
> That's great!  I just did a last minute double-check of your last 
> (final) webrevs to be sure.
> 
> Have you tested Java2Demo with these changes?  I'd also run any 
> regression tests you can find with the changes.  If there are no 
> problems there, then you are good to go to push it...
> 
> 			...jim
> 
> On 8/5/2010 8:08 AM, Denis Lila wrote:
> > Hello.
> >
> >> Are you a registered OpenJDK developer?
> > I am now.
> > Can I go ahead and push it?
> >
> > Regards,
> > Denis.



More information about the 2d-dev mailing list