8252133: The java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java fails if metal pipeline is active

Reviewed-by: prr
This commit is contained in:
Sergey Bylokhov 2020-10-21 00:15:46 +00:00
parent afc967fcd0
commit e5870cf002
3 changed files with 84 additions and 56 deletions

View file

@ -131,9 +131,14 @@ public final class CGraphicsDevice extends GraphicsDevice
return scale;
}
public void invalidate(final int defaultDisplayID) {
/**
* Invalidates this device so it will point to some other "new" device.
*
* @param device the new device, usually the main screen
*/
public void invalidate(CGraphicsDevice device) {
//TODO do we need to restore the full-screen window/modes on old device?
displayID = defaultDisplayID;
displayID = device.displayID;
}
@Override