<AWT Dev> [8] RFR for 8150258: [TEST] HiDPI: create a test for multiresolution menu items icons
Alexander Stepanov
alexander.v.stepanov at oracle.com
Mon Feb 29 15:45:13 UTC 2016
The following version of the test passes for OS X + retina (as well as
for Windows and Linux):
http://cr.openjdk.java.net/~avstepan/8150258/webrev.01/
not sure if "-Dsun.java2d.uiScale" option was intended for use with OS X
(probably an enhancement bug should be created).
So for OS X now we have only single test run in fact.
Thanks,
Alexander
On 2/29/2016 5:12 PM, Alexander Stepanov wrote:
> Hello Sergey,
>
> When running the following trivial test case (having Color set to
> "Generic RGB Profile")
>
> import java.awt.*;
>
> public class ColorTest extends Frame {
>
> private void UI() {
> setSize(100, 100);
> setBackground(Color.BLUE);
> setVisible(true);
> }
>
> public ColorTest() throws Exception {
> EventQueue.invokeAndWait(this::UI);
> }
>
> public static void main(String[] args) throws Exception {
> ColorTest test = new ColorTest();
> Thread.sleep(1000);
>
> Point pt = test.getLocationOnScreen();
> System.out.println("color = " +
> (new Robot()).getPixelColor(pt.x + 50, pt.y + 50));
> test.dispose();
> }
> }
>
> the expected output appears:
>
> color = java.awt.Color[r=0,g=0,b=255]
>
> At the same time the Color for the Icon is "[r=0,g=0,b=248]"
>
> Could you please let me know if the test still fails for you when
> simply set "expected = C2X" on the ln 116 and comment out the 1st "@run"?
>
> Not sure if it should be considered as a bug, or some additional
> settings are required, or the color check should be simply softened
> (some tolerance used).
>
> Thanks,
> Alexander
>
>
> On 2/26/2016 6:13 PM, Alexander Stepanov wrote:
>> It seemingly does not help (but maybe I'm doing something wrong).
>>
>> On 2/26/2016 5:45 PM, Sergey Bylokhov wrote:
>>> On 26.02.16 17:27, Alexander Stepanov wrote:
>>>> It seems that for osx + retina
>>>>
>>>> 1. -Dsun.java2d.uiScale option is ignored for multires. image (in
>>>> contrast for HiDPI + Win. 8, for example). Should it be considered
>>>> as a
>>>> bug? At a 1st glance, yes.
>>>> 2. even in case of correct color robot's getPixelColor() returns for
>>>> retina a bit shifted color ((0, 0, 251) for blue instead of (0, 0,
>>>> 255))
>>>> - not sure if that could be considered as an issue, or the color check
>>>> should be simply softened.
>>>
>>> Can you try to set Generic color RGB profile for the Display?
>>>
>>>>
>>>> Thanks,
>>>> Alexander
>>>>
>>>> P.S. I performed test runs on HiDPI Windows 8 and regular Ubuntu 14.04
>>>> Linux initially (which is incomplete)
>>>>
>>>>
>>>>
>>>> On 2/26/2016 4:41 PM, Alexander Stepanov wrote:
>>>>> Hello Sergey,
>>>>>
>>>>> No, as well as for 8150724. I have to re-check, thank you.
>>>>>
>>>>> Regards,
>>>>> Alexander
>>>>>
>>>>> On 2/26/2016 4:36 PM, Sergey Bylokhov wrote:
>>>>>> Hi, Alexander.
>>>>>> The test failed on my OSX 10.11 + retina. Is it expected?
>>>>>>
>>>>>> On 25.02.16 17:51, Alexander Stepanov wrote:
>>>>>>> Sorry, just a reminder.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Alexander
>>>>>>>
>>>>>>> On 2/19/2016 7:17 PM, Alexander Stepanov wrote:
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> Could you please review the following fix
>>>>>>>> http://cr.openjdk.java.net/~avstepan/8150258/webrev.00/
>>>>>>>> for
>>>>>>>> https://bugs.openjdk.java.net/browse/JDK-8150258
>>>>>>>>
>>>>>>>> Just a single test added.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Alexander
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
More information about the awt-dev
mailing list