[OpenJDK 2D-Dev] Request for Review: JDK-8162591 All existing gradient paint implementations have issues with coordinates/sizes larger than Short.MAX_VALUE (exactly) on any Linux systems

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Mon Sep 26 16:50:26 UTC 2016


Hi, Clemens.
Should we also check the transform?
I guess we already do this in some way, but is it enough?
        try {
             at.invert();
         } catch (NoninvertibleTransformException ex) {
             ex.printStackTrace();
         }

On 26.09.16 18:48, Clemens Eisserer wrote:
> Hello,
>
> The cause of JDK-8162591 is Java2D's gradient implementation allowing
> for coordinates to be specified using floating point values, whereas
> XRender is limited to a 16.16 fixed point format - which can therefor
> easily overflow.
>
> This patch checks whether the supplied coordinates can be represented
> by XRenders fixed-point format, falling back to software otherwise.
>
> Please find a fist version of the proposed patch at:
> http://93.83.133.214/8162591/webrev.01/
>
> Thank you in advance and best regards, Clemens
>


-- 
Best regards, Sergey.



More information about the 2d-dev mailing list