<AWT Dev> [10] Review Request: JDK-8159062 : [hidpi] DnD on Windows while scaling is non-integer

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

<AWT Dev> [10] Review Request: JDK-8159062 : [hidpi] DnD on Windows while scaling is non-integer

Pankaj Bansal

Hi All,

 

Please review the fix for JDK 10.

 

Bug:

https://bugs.openjdk.java.net/browse/JDK-8159062

 

Webrev:

 http://cr.openjdk.java.net/~psadhukhan/pankaj/JDK-8159062-webrev.00/

 

Issue:

There are issue with the mouse move events when HIDPI scale is set to some non-integer value like 1.25, 1.5, 2.5.

 

Fix:

The issue is due to precision error. In native side in the awt_Win32GraphicsDevice class,  ScaleUp and ScaleDown functions are used to get scaled value where ceil is used. But in java side, ClipRound is used which rounds the value instead of ceil. I think we should be doing round in native side also. This fixes the issue.

 

Regards,

Pankaj Bansal

 

Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] Review Request: JDK-8159062 : [hidpi] DnD on Windows while scaling is non-integer

Sergey Bylokhov
Hi, Pankaj.
Please provide a test case for the issue.

On 24/10/2017 02:43, Pankaj Bansal wrote:

> Hi All,
>
> Please review the fix for JDK 10.
>
> Bug:
>
> https://bugs.openjdk.java.net/browse/JDK-8159062
>
> Webrev:
>
> http://cr.openjdk.java.net/~psadhukhan/pankaj/JDK-8159062-webrev.00/
>
> Issue:
>
> There are issue with the mouse move events when HIDPI scale is set to
> some non-integer value like 1.25, 1.5, 2.5.
>
> Fix:
>
> The issue is due to precision error. In native side in the
> awt_Win32GraphicsDevice class,  ScaleUp and ScaleDown functions are used
> to get scaled value where ceil is used. But in java side, ClipRound is
> used which rounds the value instead of ceil. I think we should be doing
> round in native side also. This fixes the issue.
>
> Regards,
>
> Pankaj Bansal
>


--
Best regards, Sergey.
Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] Review Request: JDK-8159062 : [hidpi] DnD on Windows while scaling is non-integer

Pankaj Bansal
Hi Sergey,

I have added a test case and updated the webrev. Please have a look.

Webrev
http://cr.openjdk.java.net/~arapte/pankaj/8159062/webrev.01/

Regards,
Pankaj Bansal

-----Original Message-----
From: Sergey Bylokhov
Sent: Wednesday, October 25, 2017 1:04 AM
To: Pankaj Bansal; [hidden email]; Semyon Sadetsky; Prem Kumar Balakrishnan ([hidden email])
Subject: Re: [10] Review Request: JDK-8159062 : [hidpi] DnD on Windows while scaling is non-integer

Hi, Pankaj.
Please provide a test case for the issue.

On 24/10/2017 02:43, Pankaj Bansal wrote:

> Hi All,
>
> Please review the fix for JDK 10.
>
> Bug:
>
> https://bugs.openjdk.java.net/browse/JDK-8159062
>
> Webrev:
>
> http://cr.openjdk.java.net/~psadhukhan/pankaj/JDK-8159062-webrev.00/
>
> Issue:
>
> There are issue with the mouse move events when HIDPI scale is set to
> some non-integer value like 1.25, 1.5, 2.5.
>
> Fix:
>
> The issue is due to precision error. In native side in the
> awt_Win32GraphicsDevice class,  ScaleUp and ScaleDown functions are
> used to get scaled value where ceil is used. But in java side,
> ClipRound is used which rounds the value instead of ceil. I think we
> should be doing round in native side also. This fixes the issue.
>
> Regards,
>
> Pankaj Bansal
>


--
Best regards, Sergey.
Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] Review Request: JDK-8159062 : [hidpi] DnD on Windows while scaling is non-integer

Sergey Bylokhov
Looks fine.

On 25/10/2017 06:40, Pankaj Bansal wrote:

> Hi Sergey,
>
> I have added a test case and updated the webrev. Please have a look.
>
> Webrev
> http://cr.openjdk.java.net/~arapte/pankaj/8159062/webrev.01/
>
> Regards,
> Pankaj Bansal
>
> -----Original Message-----
> From: Sergey Bylokhov
> Sent: Wednesday, October 25, 2017 1:04 AM
> To: Pankaj Bansal; [hidden email]; Semyon Sadetsky; Prem Kumar Balakrishnan ([hidden email])
> Subject: Re: [10] Review Request: JDK-8159062 : [hidpi] DnD on Windows while scaling is non-integer
>
> Hi, Pankaj.
> Please provide a test case for the issue.
>
> On 24/10/2017 02:43, Pankaj Bansal wrote:
>> Hi All,
>>
>> Please review the fix for JDK 10.
>>
>> Bug:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8159062
>>
>> Webrev:
>>
>> http://cr.openjdk.java.net/~psadhukhan/pankaj/JDK-8159062-webrev.00/
>>
>> Issue:
>>
>> There are issue with the mouse move events when HIDPI scale is set to
>> some non-integer value like 1.25, 1.5, 2.5.
>>
>> Fix:
>>
>> The issue is due to precision error. In native side in the
>> awt_Win32GraphicsDevice class,  ScaleUp and ScaleDown functions are
>> used to get scaled value where ceil is used. But in java side,
>> ClipRound is used which rounds the value instead of ceil. I think we
>> should be doing round in native side also. This fixes the issue.
>>
>> Regards,
>>
>> Pankaj Bansal
>>
>
>
> --
> Best regards, Sergey.
>


--
Best regards, Sergey.
Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] Review Request: JDK-8159062 : [hidpi] DnD on Windows while scaling is non-integer

Prem Balakrishnan
+1

Regards,
Prem

-----Original Message-----
From: Sergey Bylokhov
Sent: Friday, October 27, 2017 6:46 AM
To: Pankaj Bansal; [hidden email]; Semyon Sadetsky; Prem Balakrishnan
Subject: Re: [10] Review Request: JDK-8159062 : [hidpi] DnD on Windows while scaling is non-integer

Looks fine.

On 25/10/2017 06:40, Pankaj Bansal wrote:

> Hi Sergey,
>
> I have added a test case and updated the webrev. Please have a look.
>
> Webrev
> http://cr.openjdk.java.net/~arapte/pankaj/8159062/webrev.01/
>
> Regards,
> Pankaj Bansal
>
> -----Original Message-----
> From: Sergey Bylokhov
> Sent: Wednesday, October 25, 2017 1:04 AM
> To: Pankaj Bansal; [hidden email]; Semyon Sadetsky; Prem
> Kumar Balakrishnan ([hidden email])
> Subject: Re: [10] Review Request: JDK-8159062 : [hidpi] DnD on Windows
> while scaling is non-integer
>
> Hi, Pankaj.
> Please provide a test case for the issue.
>
> On 24/10/2017 02:43, Pankaj Bansal wrote:
>> Hi All,
>>
>> Please review the fix for JDK 10.
>>
>> Bug:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8159062
>>
>> Webrev:
>>
>> http://cr.openjdk.java.net/~psadhukhan/pankaj/JDK-8159062-webrev.00/
>>
>> Issue:
>>
>> There are issue with the mouse move events when HIDPI scale is set to
>> some non-integer value like 1.25, 1.5, 2.5.
>>
>> Fix:
>>
>> The issue is due to precision error. In native side in the
>> awt_Win32GraphicsDevice class,  ScaleUp and ScaleDown functions are
>> used to get scaled value where ceil is used. But in java side,
>> ClipRound is used which rounds the value instead of ceil. I think we
>> should be doing round in native side also. This fixes the issue.
>>
>> Regards,
>>
>> Pankaj Bansal
>>
>
>
> --
> Best regards, Sergey.
>


--
Best regards, Sergey.