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

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] <Swing Dev> [10] Review Request 8187367: Numerous swing display problems with s
From:       Semyon Sadetsky <semyon.sadetsky () oracle ! com>
Date:       2017-09-19 14:58:44
Message-ID: 170b93d2-abae-1080-2eae-9d0e5c07dcf1 () oracle ! com
[Download RAW message or body]

On 09/18/2017 12:01 PM, Sergey Bylokhov wrote:
> Hi, Semyon.
> Is it possible to write a test case for this issue? It will be helpful 
> to understand the bug and a fix.

Writing the test is hard because those inner interfaces are  too deep 
inside. You can use SwingSet2 demo to see the described artifacts at 
fractional scales before the fix.

>
> On 9/18/17 09:36, Semyon Sadetsky wrote:
>> Hello,
>>
>> Please review fix for JDK10 (in Swing and Java2D):
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8187367
>>
>> webrev: http://cr.openjdk.java.net/~ssadetsky/8187367/webrev.00/
>>
>> Swing apps  may have artifacts on HiDPI screens with fractional 
>> scales. There are several issues which may cause various artifacts 
>> but the current fix only eliminates one type of artifacts the 
>> vertical and horizontal lines on painted surfaces (other issues are 
>> addressed by [1] and [2]). This issue was introduced after 8073320 
>> and then incorrectly fixed in 8163193.
>>
>> The root cause is the painter pattern is drawn on a wrongly sized and 
>> scaled image in case the image is an off-screen volatile image. The 
>> painter doesn't take into account the volatile image inner scale 
>> transformation which is not an identity in case of HiDPI , so the 
>> resulting image is drawn on of off-screen surface that in the scale 
>> times bigger than it is actually necessary. Since such images are 
>> cached this was waste of RAM. Also, the bounds sent to the painter 
>> class don't take into account the transformation rounding error the 
>> latter caused artifacts on the drawing edges.
>>
>> --Semyon
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8187585
>>
>> [2] https://bugs.openjdk.java.net/browse/JDK-8187586
>>
>
>

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

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