[OpenJDK 2D-Dev] Review Request: Small tweak in the DrawImage.java
james.graham at oracle.com
Thu Nov 12 22:50:37 UTC 2015
On 11/12/2015 1:54 PM, Sergey Bylokhov wrote:
> On 12.11.15 23:46, Jim Graham wrote:
>> Hi Sergey,
>> I think the added logic is fine, but I would hesitate removing all of
>> those lines with comments simply because:
>> - In terms of code generated it is no more efficient to do the tests up
>> above or down below.
>> - Your question below does not indicate enough investigation to remove
>> that big long reminder, even if it is true that other pipelines need to
>> have similar tests. Keep in mind that this is a reminder of why not to
>> remove those checks even if they look like they don't really help
>> anything and the amount of work it would take to eliminate them should
>> we want to do that in the future...
> Actually my intention was to create the small and fast list of checks,
> which allow us totally to skip all Blits machinery.
I agree with that. I'm just saying that it would be better to leave the
w,h tests where they are with their big comment and not to touch that
part of the code.
The rest of the tests (testing for copying bits to the same location on
the same SD) have to appear a few lines further down in the code, but
that's fine. I don't think placing all possible tests that can
contribute to short-cutting the operation in a single place with a
single if statement is that much of a gain compared to leaving in that
> I can add a comment that this code is for performance, what do you think?
I'd like to see that, was there an updated diff? In either case, I
don't think we should disturb the comment and test at the top, we should
just add additional checks down below where you have them now...
More information about the 2d-dev