On Thu, 27 Jan 2022 18:46:53 GMT, Phil Race <p...@openjdk.org> wrote:
> But why are X11 and Windows fine with no scale ? Since the coordinates are in the device space, and we pass this coordinates to the OS as is, and the OS returns the images of the requested size we do not need to use a scale there. Unlike macOS where we should have coordinates in the user space and device space at the same time. So instead of the second coordinates we pass the scale and calculate others coordinate. > BTW "usually this is 1x1 pixel on lowdpi and 4x4 on hidpi screen, actually > macOS may return any size" > > When might it return "any size" ? My experiments show scale==2 no matter what > scale I use in the macos Display settings for the built-in retina Per the specification of the method we use: [kCGWindowImageBestResolution](https://developer.apple.com/documentation/coregraphics/cgwindowimageoption/kcgwindowimagebestresolution). So when we request the area in the user space, that method may return low/hi/something in between/ image, then we convert/scale that image to fit the array we allocated. ------------- PR: https://git.openjdk.java.net/jdk/pull/5864