7175183: [macosx] Objective-C exception thrown when switching monitor configuration
Reviewed-by: prr, serb
--- a/jdk/src/share/classes/sun/awt/image/VolatileSurfaceManager.java Wed Sep 05 17:33:52 2012 -0700
+++ b/jdk/src/share/classes/sun/awt/image/VolatileSurfaceManager.java Thu Sep 06 14:59:54 2012 +0400
@@ -333,11 +333,12 @@
// using a SurfaceData that was created in a different
// display mode.
sdBackup = null;
- sdCurrent = getBackupSurface();
// Now, invalidate the old hardware-based SurfaceData
+ // Note that getBackupSurface may set sdAccel to null so we have to invalidate it before
SurfaceData oldData = sdAccel;
sdAccel = null;
oldData.invalidate();
+ sdCurrent = getBackupSurface();
}
// Update graphicsConfig for the vImg in case it changed due to
// this display change event