> 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

Sergey Bylokhov has updated the pull request with a new target base due to a 
merge or a rebase. The incremental webrev excludes the unrelated changes 
brought in by the merge/rebase. The pull request contains three additional 
commits since the last revision:

 - the new check
 - Merge branch 'master' into JDK-8274939
 - Initial fix JDK-8274939

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5864/files
  - new: https://git.openjdk.java.net/jdk/pull/5864/files/f06c280a..9db451f1

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5864&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5864&range=00-01

  Stats: 1029674 lines in 4538 files changed: 553493 ins; 449639 del; 26542 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5864.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5864/head:pull/5864

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

Reply via email to