jdk/src/share/classes/sun/awt/image/VolatileSurfaceManager.java
changeset 13770 c50a78763e19
parent 5506 202f599c92aa
child 23010 6dadb192ad81
equal deleted inserted replaced
13656:776ac504ea9b 13770:c50a78763e19
   331         if (sdAccel != null) {
   331         if (sdAccel != null) {
   332             // First, nullify the software surface.  This guards against
   332             // First, nullify the software surface.  This guards against
   333             // using a SurfaceData that was created in a different
   333             // using a SurfaceData that was created in a different
   334             // display mode.
   334             // display mode.
   335             sdBackup = null;
   335             sdBackup = null;
   336             sdCurrent = getBackupSurface();
       
   337             // Now, invalidate the old hardware-based SurfaceData
   336             // Now, invalidate the old hardware-based SurfaceData
       
   337             // Note that getBackupSurface may set sdAccel to null so we have to invalidate it before
   338             SurfaceData oldData = sdAccel;
   338             SurfaceData oldData = sdAccel;
   339             sdAccel = null;
   339             sdAccel = null;
   340             oldData.invalidate();
   340             oldData.invalidate();
       
   341             sdCurrent = getBackupSurface();
   341         }
   342         }
   342         // Update graphicsConfig for the vImg in case it changed due to
   343         // Update graphicsConfig for the vImg in case it changed due to
   343         // this display change event
   344         // this display change event
   344         vImg.updateGraphicsConfig();
   345         vImg.updateGraphicsConfig();
   345     }
   346     }