[OpenJDK Rasterizer] Marlin renderer contribution for review

Phil Race philip.race at oracle.com
Wed Mar 25 21:44:07 UTC 2015


FastMath: 
http://cr.openjdk.java.net/~lbourges/marlin/marlin.3/src/java.desktop/share/classes/sun/java2d/marlin/FastMath.java.html

says its from here : http://www.java-gaming.org/index.php?topic=24194.0

but that in turn may be from somewhere else unknown ..

Aside from the provenance of the code, and even though its a 'trick' 
rather than a body of code,
other options are preferable, so it might be interesting to get Joe's 
input on what other options
there are that maintain correctness and give better performance - I 
assume this gives
a measurable benefit ?

Is the limitation on the input range an issue ? There's no test here for 
that, and
correctness-wise this does seem to break down if the input is NaN.

-phil.

On 03/23/2015 09:14 AM, dalibor topic wrote:
> I took a look at the webrev, and I have no objections, other than that 
> src/java.desktop/share/classes/sun/java2d/marlin/FastMath.java seems 
> to be based off third party code with an unknown license.
>
> So that class should be removed in the next iteration.
>
> It may be worth filing a bug to optimize Math.* performance in general 
> with respect to known classes of inputs instead. Alternatively, 
> StrictMath versions of these methods should be in pure Java, and avoid 
> the JNI invocation penalty, so could be worth a try as well.
>
> cheers,
> dalibor topic
>
> On 19.03.2015 00:25, Laurent Bourgès wrote:
>> Jim,
>>
>> Here is the new webrev:
>> http://cr.openjdk.java.net/~lbourges/marlin/marlin.3/
>>
>> Changes:
>> - discussed changes in Dasher, Stroker, TransformingPathConsumer2D
>> - indentation, line breaks (continuation lines)
>> - revert many float suffix in math operations (useless ? does the
>> compiler make conversions ?)
>>
>> Hope it looks better ...
>>
>> Good night,
>> Laurent
>



More information about the graphics-rasterizer-dev mailing list