[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:       2021-10-29 5:55:16
Message-ID: PHAV_vKtHoIQIZttkQ3vXpWJ65z4l8KfFkJ1Zdkm2N8=.03f11f61-0fc6-4b6f-b62f-ae312f1e8e53 () 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

Does anybody have some comments or suggestions? I would like to fix this before \
adding more changes to the robot code.

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

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