[OpenJDK Rasterizer] [OpenJDK 2D-Dev] Path2D optimizations
Phil Race
philip.race at oracle.com
Tue Mar 31 21:51:59 UTC 2015
Hi,
This looks like something it would be good to push to the
http://hg.openjdk.java.net/jdk9/client/jdk repo first.
That can then be backported to 8u60.
Then we'll sync it into graphics-rasterizer as part of a normal JDK
forest sync.
The only catch is you aren't a JDK 9 committer so you can prepare
a patch, or even a changeset, but can't do the actual push although
preparing this patch will help get you there. So Jim, or I, or someone
else who is a committer can push it for you.
-phil.
On 3/31/2015 7:33 AM, Laurent Bourgès wrote:
> 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/
> <http://cr.openjdk.java.net/%7Elbourges/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 intographics-rasterizer and later it will be merged into java2d and possibly backported to JDK8 ?
>
> Laurent
More information about the graphics-rasterizer-dev
mailing list