[OpenJDK 2D-Dev] Please review patch for 7150134

Clemens Eisserer linuxhippy at gmail.com
Thu Apr 5 15:37:28 UTC 2012


Hi Mario,

> The patch looks good to me.
Thanks for taking a look.

> Just wondering what is the impact of those two checks:
>
> +        if (compClip.contains(transX1, transY1)
> +                && compClip.contains(transX2, transY2)) {
>
> for the most common cases?

I wasn't able to measure any difference using J2Bench, out of
curiousity I had a look at Region.contains().
In the common case with a rectangular clip (bands==null), it should
just execute these few comparisons:

>        if (x < lox || x >= hix || y < loy || y >= hiy) return false;
>        if (bands == null) return true;


Thanks again, Clemens



More information about the 2d-dev mailing list