[OpenJDK 2D-Dev] Please review patch for 7150134
Jim Graham
james.graham at oracle.com
Fri Apr 13 01:15:06 UTC 2012
For a complex clip it is not enough to test the two endpoints so I don't
think this fix will work for a line that spans between two portions of a
non-rectangular clip over a region that is outside the clip...
...jim
On 4/5/2012 5:49 AM, Clemens Eisserer wrote:
> Hi,
>
> Please take a look at the patch for bug 7150134, located at
> http://cr.openjdk.java.net/~ceisserer/7150134/
>
> The problem was caused by a fast-path in drawLine() which didn't take
> clipping into account, therefor huge lines that would have been
> clipped away caused OOMs in xrender's bresenham code. Because the
> fast-path provides nice speedups (e.g. 300% for 20px horizontal lines
> measured with J2DBench) I don't want to sacrifice it entirely.
>
> This fix only takes the fast-path in case the line is completly
> un-clipped, otherwise it lets generic Java2D code handle it:
> http://cr.openjdk.java.net/~ceisserer/7150134/
>
> Thanks, Clemens
More information about the 2d-dev
mailing list