[OpenJDK 2D-Dev] RFR: 8252070 Some platform-specific BLIT optimizations are not effective
Philip Race
philip.race at oracle.com
Sat Aug 29 19:01:45 UTC 2020
I note that you change the signature of blitSurfaceData to private.
I think this is fine. Since it is only used in this class I imagine
whatever reason
it was supposed it might need to be over-ridden has never arisen ..
But I still had to first go check that it isn't actually used elsewhere !
I'm not sure I get the comment about the intersection operation causing
performance problems.
Are you referring to the cost of that intersection operation itself, or
some downstream consequence ?
-phil
On 8/28/20, 6:26 PM, Sergey Bylokhov wrote:
> Hello.
> Please review the fix for jdk/client.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8252070
> Fix: http://cr.openjdk.java.net/~serb/8252070/webrev.01
>
> Some of our code assumes that the native system(XRender, D3D, OGL)
> makes some
> effective optimizations, but in some cases, we can do better.
>
> One of the areas for improvements is direct blitting. If the source is
> much
> bigger than the destination we should not try to copy the non-existent
> area
> and could cut coordinates accordingly.
>
> The actual change is:
> 951 Rectangle dst =
> 952 new Rectangle(dx, dy, w,
> h).intersection(dstData.getBounds());
> 953 if (dst.isEmpty()) {
> 972 // return
> 975 }
> 979 sx += dst.x - dx;
> 980 sy += dst.y - dy;
>
>
> See performance data and some additional comments:
> https://bugs.openjdk.java.net/browse/JDK-8252070?focusedCommentId=14365864&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14365864
>
>
More information about the 2d-dev
mailing list