Skip to content

Commit

Permalink
8298887: On the latest macOS+XCode the Robot API may report wrong colors
Browse files Browse the repository at this point in the history
Reviewed-by: phh, andrew
Backport-of: ceb6793bf3b5855c7c521678b5d99d752800b441
  • Loading branch information
mrserb committed Aug 30, 2024
1 parent 8b0fedc commit e32d62e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
6 changes: 1 addition & 5 deletions jdk/src/macosx/native/sun/awt/CRobot.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@

#define k_JAVA_ROBOT_WHEEL_COUNT 1

#if !defined(kCGBitmapByteOrder32Host)
#define kCGBitmapByteOrder32Host 0
#endif

// In OS X, left and right mouse button share the same click count.
// That is, if one starts clicking the left button rapidly and then
// switches to the right button, then the click count will continue
Expand Down Expand Up @@ -324,7 +320,7 @@ static void PostMouseEvent(const CGPoint point, CGMouseButton button,
8, picWidth * sizeof(jint),
picColorSpace,
kCGBitmapByteOrder32Host |
kCGImageAlphaPremultipliedFirst);
kCGImageAlphaNoneSkipFirst);

CGColorSpaceRelease(picColorSpace);

Expand Down
10 changes: 1 addition & 9 deletions jdk/src/macosx/native/sun/awt/QuartzSurfaceData.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -28,14 +28,6 @@
#import "AWTFont.h"
#import <Cocoa/Cocoa.h>

// these flags are not defined on Tiger on PPC, so we need to make them a no-op
#if !defined(kCGBitmapByteOrder32Host)
#define kCGBitmapByteOrder32Host 0
#endif
#if !defined(kCGBitmapByteOrder16Host)
#define kCGBitmapByteOrder16Host 0
#endif

// NOTE : Modify the printSurfaceDataDiagnostics API if you change this enum
enum SDRenderType
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
/**
* @test
* @key headful
* @bug 8215105
* @bug 8215105 8298887
* @summary tests that Robot can capture the common colors without artifacts
*/
public final class CheckCommonColors {
Expand Down
2 changes: 1 addition & 1 deletion jdk/test/java/awt/font/GlyphVector/MultiSlotFontTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/**
* @test
* @bug 8240756
* @bug 8240756 8298887
* @summary Non-English characters are printed with wrong glyphs on MacOS
* @modules java.desktop/sun.java2d java.desktop/sun.java2d.loops java.desktop/sun.font
* @requires os.family == "mac"
Expand Down

1 comment on commit e32d62e

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.