7154088: [macosx] Regression: Component.createImage do not inherits component attributes
authorbae
Mon, 21 May 2012 14:53:51 +0400
changeset 12637 983d636eed7c
parent 12636 03f4fb9b26be
child 12638 e3c87b0ead0d
child 12808 20329ff2140c
7154088: [macosx] Regression: Component.createImage do not inherits component attributes Reviewed-by: art, kizune
jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java
--- a/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Mon May 21 14:04:46 2012 +0400
+++ b/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Mon May 21 14:53:51 2012 +0400
@@ -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