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

List:       openjdk-2d-dev
Subject:    Re: RFR: 8274939: Incorrect size of the pixel storage is used by the robot on macOS
From:       Sergey Bylokhov <serb () openjdk ! java ! net>
Date:       2022-01-28 9:58:10
Message-ID: 7KzuciywOHkrs2j5OFeXdlQ5JMU0bqIYczt7tTl0fO0=.879d329d-0c98-4514-a928-f6d4edcaa0c5 () github ! com
[Download RAW message or body]

On Fri, 8 Oct 2021 10:23:13 GMT, Sergey Bylokhov <serb@openjdk.org> wrote:

> In JDK 9 the native code for the robot class was reworked to get an access to the \
> HiDPI quality screenshots. So we allocate the data storage for the HiDPI quality \
> and then request the best quality from the macOS. 
> It works fine if the user request the screenshot of some area, since we properly \
> scale this area. Unfortunately it does not work well if the user request only one \
> pixel, in this case we allocate the array of one element and does not multiply the \
> size by the scale, so if the system scale is 2 then the macOS returns the 2x2 \
> pixels, which does not fit properly to the array of one element. This can be \
> checked by the Xcheck:jni option which produce fatal error in this case. 
> Solution is to allocate the storage of the proper size 1 * scale * 1 * scale

You are absolutely right! in case of linux we have the same bug when gtk is used. =(

-------------

PR: https://git.openjdk.java.net/jdk/pull/5864


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

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