mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-11 08:23:26 +00:00
8266242: java/awt/GraphicsDevice/CheckDisplayModes.java failing on macOS 11 ARM
Reviewed-by: prr, azvegint, aivanov
This commit is contained in:
parent
e942f368c3
commit
f7d6d7a04f
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2023, 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
|
||||
@ -35,6 +35,7 @@
|
||||
#define DEFAULT_DEVICE_HEIGHT 768
|
||||
#define DEFAULT_DEVICE_DPI 72
|
||||
|
||||
static NSInteger architecture = -1;
|
||||
/*
|
||||
* Convert the mode string to the more convenient bits per pixel value
|
||||
*/
|
||||
@ -58,7 +59,17 @@ static int getBPPFromModeString(CFStringRef mode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static BOOL isValidDisplayMode(CGDisplayModeRef mode){
|
||||
static BOOL isValidDisplayMode(CGDisplayModeRef mode) {
|
||||
// Workaround for apple bug FB13261205, since it only affects arm based macs
|
||||
// and arm support started with macOS 11 ignore the workaround for previous versions
|
||||
if (@available(macOS 11, *)) {
|
||||
if (architecture == -1) {
|
||||
architecture = [[NSRunningApplication currentApplication] executableArchitecture];
|
||||
}
|
||||
if (architecture == NSBundleExecutableArchitectureARM64) {
|
||||
return (CGDisplayModeGetPixelWidth(mode) >= 800);
|
||||
}
|
||||
}
|
||||
return (1 < CGDisplayModeGetWidth(mode) && 1 < CGDisplayModeGetHeight(mode));
|
||||
}
|
||||
|
||||
|
||||
@ -462,7 +462,6 @@ java/awt/KeyboardFocusmanager/TypeAhead/MenuItemActivatedTest/MenuItemActivatedT
|
||||
java/awt/Window/GetScreenLocation/GetScreenLocationTest.java 8225787 linux-x64
|
||||
java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java 8266243 macosx-aarch64
|
||||
java/awt/dnd/BadSerializationTest/BadSerializationTest.java 8277817 linux-x64,windows-x64
|
||||
java/awt/GraphicsDevice/CheckDisplayModes.java 8266242 macosx-aarch64
|
||||
java/awt/GraphicsDevice/DisplayModes/UnknownRefrshRateTest.java 8286436 macosx-aarch64
|
||||
java/awt/image/multiresolution/MultiresolutionIconTest.java 8291979 linux-x64,windows-all
|
||||
java/awt/event/SequencedEvent/MultipleContextsFunctionalTest.java 8305061 macosx-x64
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user