[OpenJDK Rasterizer] [OpenJDK 2D-Dev] Path2D optimizations

Laurent Bourgès bourges.laurent at gmail.com
Tue Mar 31 14:33:24 UTC 2015


Jim,


> Test program, line 490 - MOVETO has 2 coordinates associated with it.
>>
>
> Well spotted: I did it too quickly, sorry.
>
> Test program, line 492 - perhaps we should throw an exception on default
>> since it indicates a problem with the iterator
>>
>
> Ok.
>

Here is the new webrev:
http://cr.openjdk.java.net/~lbourges/path2D/Path2D.4/

I fixed the getLength(type) method:

 482     static int getLength(int type) {
 483         switch(type) {
 484             case PathIterator.SEG_CUBICTO:
 485                 return 6;
 486             case PathIterator.SEG_QUADTO:
 487                 return 4;* 488             case PathIterator.SEG_LINETO:
 489             case PathIterator.SEG_MOVETO:
 490                 return 2;
* 491             case PathIterator.SEG_CLOSE:
 492                 return 0;* 493             default:
 494                 throw new IllegalStateException("Invalid type: " + type);
* 495         }
 496     }


If it is good, could you push this patch in both graphics-rasterizer
and java2d repositories ?

or do you prefer I push this patch into graphics-rasterizer and later
it will be merged into java2d and possibly backported to JDK8 ?


Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/graphics-rasterizer-dev/attachments/20150331/0bdb4698/attachment.html>


More information about the graphics-rasterizer-dev mailing list