<Swing Dev> [9] Review request for 8160986 Bad rendering of Swing UI controls with Metal L&F on HiDPI display

Alexandr Scherbatiy alexandr.scherbatiy at oracle.com
Wed Jul 27 16:49:12 UTC 2016


Hello,

Could you review the updated fix:
   http://cr.openjdk.java.net/~alexsch/8160986/webrev.01

- horizontal scroll bars are updated
- the test name is updated
- the instruction to test both vertical and horizontal scroll bars are 
added to the test

I run the SwingMark for the JRadioButton which is painted with 
selected/deselected and enabled states
and JScrollPane which shows vertical and horizontal scroll bars in turn.
Each component was repainted 2002 times and the test was repeated 20 times.

The results below show the SwingMark tests score for D3D on/off in format:
test score for the component before the fix [link to the results] -> 
test score for the component after the fix (using ovals or polygons) 
[link to the results] performance increasing in percents.

JRadioButton
D3D on: 20468 [1] -> 21486 [2] performance increasing: 5%
D3D off: 20299 [3] -> 21075 [4] performance increasing: 4%

JScrollPane
D3D  on: 56184 [5] -> 57742 [6] performance increasing: 3%
D3D off: 51758 [7] -> 52987 [8] performance increasing: 3%

If it is necessary, polygons which draw triangles can be replaced by 
Line2D.Float().

Thanks,
Alexandr.

[1] 
http://cr.openjdk.java.net/~alexsch/8160986/swingmark/00/radio-button-d3d-on-base.txt
[2] 
http://cr.openjdk.java.net/~alexsch/8160986/swingmark/00/radio-button-d3d-on-oval.txt
[3] 
http://cr.openjdk.java.net/~alexsch/8160986/swingmark/00/radio-button-d3d-off-base.txt
[4] 
http://cr.openjdk.java.net/~alexsch/8160986/swingmark/00/radio-button-d3d-off-oval.txt

[5] 
http://cr.openjdk.java.net/~alexsch/8160986/swingmark/00/scroll-pane-d3d-on-base.txt
[6] 
http://cr.openjdk.java.net/~alexsch/8160986/swingmark/00/scroll-pane-d3d-on-polygon.txt
[7] 
http://cr.openjdk.java.net/~alexsch/8160986/swingmark/00/scroll-pane-d3d-off-base.txt
[8] 
http://cr.openjdk.java.net/~alexsch/8160986/swingmark/00/scroll-pane-d3d-off-polygon.txt

On 7/27/2016 3:33 PM, Philip Race wrote:
> BTW I meant to point out (but forgot) that I want us
> to stop using bug ids as test names. When you stare
> at a list of tests in a directory I'd like to see meaningful names.
>
> I don't know what the intention was with the tests here but
> any new test should be so named ..
>
> -phil.
>
> On 7/26/16, 11:57 PM, Yuri Nesterenko wrote:
>> You mean probably that the first test would not compile since
>> it is "public class bug8160986 " in bug8031573.java ?:-)
>>
>> -yan
>>
>> On 07/27/2016 12:08 AM, Phil Race wrote:
>>> Since I noticed it right away, I am sure lots of others will soon 
>>> enough.
>>>
>>> -phil.
>>>
>>> On 07/25/2016 02:19 PM, Sergey Bylokhov wrote:
>>>> On 07.07.16 22:00, Phil Race wrote:
>>>>> the screenshot here bears that out .. ie left/right do not look to be
>>>>> any better.
>>>>>
>>>>> http://cr.openjdk.java.net/~alexsch/8160986/screenshots/scrollpane-00.png 
>>>>>
>>>>>
>>>>
>>>> Since it was missed by the author, I am not sure that it will be found
>>>> by the tester who will run the test.
>>>>
>>>>> On 07/07/2016 11:55 AM, Alexandr Scherbatiy wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> Could you review the fix:
>>>>>>   bug: https://bugs.openjdk.java.net/browse/JDK-8160986
>>>>>>   webrev: http://cr.openjdk.java.net/~alexsch/8160986/webrev.00
>>>>>>
>>>>>>   The proposed fix changes icon shapes drawn by lines to ovals and
>>>>>> polygons for JRadioButton, JComboBox and JScrollBar components 
>>>>>> for the
>>>>>> Metal L&F.
>>>>>>
>>>>>>   The screenshots [1] give a hint how UI controls look before and
>>>>>> after the fix.
>>>>>>
>>>>>>   [1] http://cr.openjdk.java.net/~alexsch/8160986/screenshots
>>>>>>
>>>>>>  Thanks,
>>>>>>  Alexandr.
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>




More information about the swing-dev mailing list