RFR: 8298887: On the latest macOS+XCode the Robot API may report wrong colors
Alexander Zvegintsev
azvegint at openjdk.org
Wed Dec 21 15:10:51 UTC 2022
On Mon, 19 Dec 2022 21:48:54 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
> The new macOS SDK provided by XCode 14.2 changed this macro:
> `# define kCGBitmapByteOrder32Host kCGBitmapByteOrder32Little`
> to this constant
> `static const CGBitmapInfo kCGBitmapByteOrder32Host = kCGBitmapByteOrder32Little;`
>
> As a result, our native code started to redefine the macro value to "define kCGBitmapByteOrder32Host 0". I think that was added a long time ago for a PPC platform.
>
> I have also changed the type of the color we pass to the java Robot, the java code expects the xrgb format(the alpha ignored), but we for some reason prepared pre-multiplied alpha.
>
> Tested on macOS 12.6.1 and 13.0.1 using xcode 14.2 and xcode 12.5.1
Looks good.
Testing on macosx-aarch64 and macosx-x64 also looks good.
-------------
Marked as reviewed by azvegint (Reviewer).
PR: https://git.openjdk.org/jdk/pull/11733
More information about the client-libs-dev
mailing list