[OpenJDK 2D-Dev] Review Request: Small tweak in the DrawImage.java

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Thu Nov 12 13:45:42 UTC 2015

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:

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.

  - 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 

Best regards, Sergey.

More information about the 2d-dev mailing list