[OpenJDK 2D-Dev] [9] Review Request: 8059942 Default implementation of DrawImage.renderImageXform() should be improved for d3d/ogl

Jim Graham james.graham at oracle.com
Fri Nov 14 22:25:31 UTC 2014


On 11/13/14 5:45 PM, Sergey Bylokhov wrote:
> Moreover this code have a big impact(hundreds percents) on the performance
> of drawing, I consider we should return region from the TransformHelper
>  directly in the future(or we should change format of edges array to the
>  bands array format). I do not see that we do a lot of calculations at the
>  native level in the TransformHelper.calculateEdges() so it should be
>  possible, I think....

One thing to consider, though, is that this code is only used in some 
rare cases - either that we don't have a direct native loop for the TH 
native code to use directly, or that it is a custom composite.  The 
gains from the elimination of the Java-to-native transitions per 
scanline also probably swamp any other tuning operation we can do here 
so I think we've reached the knee of the curve for tuning this operation 
already.

I'd rather have the (albeit internal to the implementation) API for 
Region be reliable in the results it generates than to go out of our way 
to create external loopholes for constructing the objects for some gains 
in this "backup code".

Note that if any given Src/Dst transform operation is critical to any 
application, it would be better to make sure that we have a native 
MaskBlit for that combination than to make this clipping code go any 
faster...

			...jim



More information about the 2d-dev mailing list