changeset 12638:e3c87b0ead0d

Merge
author lana
date Mon, 21 May 2012 11:20:04 -0700
parents 9dde8287f7cb 983d636eed7c
children 495d6858089b
files
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/macosx/classes/sun/awt/CGraphicsDevice.java	Thu May 17 06:20:44 2012 -0700
+++ b/jdk/src/macosx/classes/sun/awt/CGraphicsDevice.java	Mon May 21 11:20:04 2012 -0700
@@ -40,7 +40,7 @@
     private final int displayID;
 
     // Array of all GraphicsConfig instances for this device
-    private final CGraphicsConfig[] configs;
+    private final GraphicsConfiguration[] configs;
 
     // Default config (temporarily hard coded)
     private final int DEFAULT_CONFIG = 0;
@@ -49,7 +49,7 @@
 
     public CGraphicsDevice(int displayID) {
         this.displayID = displayID;
-        configs = new CGraphicsConfig[] {
+        configs = new GraphicsConfiguration[] {
             CGLGraphicsConfig.getConfig(this, 0)
         };
     }
@@ -66,7 +66,7 @@
      */
     @Override
     public GraphicsConfiguration[] getConfigurations() {
-        return configs;
+        return configs.clone();
     }
 
     /**
--- a/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Thu May 17 06:20:44 2012 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Mon May 21 11:20:04 2012 -0700
@@ -940,8 +940,8 @@
 
     @Override
     public Image createImage(int w, int h) {
-        // TODO: accelerated image
-        return getGraphicsConfiguration().createCompatibleImage(w, h);
+        CGraphicsConfig gc = (CGraphicsConfig)getGraphicsConfiguration();
+        return gc.createAcceleratedImage(getTarget(), w, h);
     }
 
     @Override
--- a/jdk/test/java/awt/GraphicsDevice/CloneConfigsTest.java	Thu May 17 06:20:44 2012 -0700
+++ b/jdk/test/java/awt/GraphicsDevice/CloneConfigsTest.java	Mon May 21 11:20:04 2012 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug     6822057
+ * @bug     6822057 7124400
  *
  * @summary Test verifies that list of supported graphics configurations
  *          can not be changed via modification of elements of an array