[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] [9] Review Request: 8146042 Offscreen rendering is different from onscreen one
From:       Sergey Bylokhov <Sergey.Bylokhov () oracle ! com>
Date:       2016-01-21 14:04:52
Message-ID: 56A0E584.3050204 () oracle ! com
[Download RAW message or body]

On 19/01/16 14:30, Semyon Sadetsky wrote:
> We are getting error because of incorrect fudge factor added to the "to"
> line coordinates (for line from - to).
> See the updated version of the fix in which test should work on OS X:
> http://cr.openjdk.java.net/~ssadetsky/8146042/webrev.02/
> Test fails on my mac book-pro with integrated i7 GPU - rectangle is
> drawn at wrong position.

It will fail on any hdpi systems(including osx+retina), The reason is 
that: when you create a VolatileImage it will take into account default 
transform of the GraphicsConfiguration(on hdpi systems it will be x2). 
When you draw a line to this VI and then take s spapshot then you 
convert the big VI image to the small BI. you need to take into account 
this scale and draw VI to BI 1-2-1, something like this:
BufferedImage capture = new BufferedImage(12x2, 12x2, 
BufferedImage.TYPE_4BYTE_ABGR_PRE);
capture.createGraphics().drawImage(vi,0,0,12x2,12x2,null);

Note that even in this case the line locations check is incorrect and 
should be adjusted.


>>>>
>>>>>>
>>>>>>>
>>>>>>> --Semyon
>>>>>>>
>>>>>>> On 1/14/2016 9:23 PM, Phil Race wrote:
>>>>>>>> This fudge factor was last adjusted in
>>>>>>>> https://bugs.openjdk.java.net/browse/JDK-6597822
>>>>>>>> way back before the D3D pipeline was released and the comments
>>>>>>>> seem to
>>>>>>>> indicate that
>>>>>>>> there was a fair amount of testing on different hardware.
>>>>>>>>
>>>>>>>> I don't know why this seems to be in un-specified
>>>>>>>> hardware-dependent
>>>>>>>> territory but
>>>>>>>> it seems quite possible that this could just as easily introduce a
>>>>>>>> different artifact
>>>>>>>> on some other hardware.
>>>>>>>>
>>>>>>>> What exactly are you testing on ? And I think it needs to
>>>>>>>> include at
>>>>>>>> least one Nvidia
>>>>>>>> and one AMD/ATI card.
>>>>>>>>
>>>>>>>> -phil.
>>>>>>>>
>>>>>>>> On 1/14/2016 10:09 AM, Semyon Sadetsky wrote:
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> Please review the fix for jdk9.
>>>>>>>>>
>>>>>>>>> bug: https://bugs.openjdk.java.net/browse/JDK-8146042
>>>>>>>>> webrev: http://cr.openjdk.java.net/~ssadetsky/8146042/webrev.00/
>>>>>>>>>
>>>>>>>>> The root cause is incorrect coordinate rounding in D3D
>>>>>>>>> renderer. To
>>>>>>>>> fix the issue one of fudge factors was adjusted.
>>>>>>>>>
>>>>>>>>> Another issue mentioning in the JIRA ticket is taken out as a
>>>>>>>>> separate bug.
>>>>>>>>>
>>>>>>>>> --Semyon
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>


-- 
Best regards, Sergey.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic