Hello.
Can somebody take a look to the small enhancement for DrawImage.java.

I will file a new CR if the proposed change will be approved:
http://cr.openjdk.java.net/~serb/perf/DrawImageItself.01/src/java.desktop/share/classes/sun/java2d/pipe/DrawImage.java.sdiff.html

The goal is to minimize the calls to Blit.Blit/BlitBG() if we know that it will be noop.
The reasons to the fix:
- Not all blits are fast when the source and destination are the same. For example ByteBinary variants are quite slow. - In case of d3d and ogl such blit change the whole state of the render context and can slowdown the rendering to another destination.

Notes:
- In the common situation one additional statement "srcData == dstData" will be executed. - The comment about the 4783274 was removed, because I am not sure we really should copy this check from this particular method to all java blits? - Probably some other checks can be added as well? What about clipRegion.intersectsQuickCheckXYXY(dx,dy,dx+w,dy+h)?


--
Best regards, Sergey.

Reply via email to