Merge
This commit is contained in:
commit
cb4100b820
jdk
src/macosx/classes/sun
test/java/awt/GraphicsDevice
@ -40,7 +40,7 @@ public class CGraphicsDevice extends GraphicsDevice {
|
||||
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 class CGraphicsDevice extends GraphicsDevice {
|
||||
|
||||
public CGraphicsDevice(int displayID) {
|
||||
this.displayID = displayID;
|
||||
configs = new CGraphicsConfig[] {
|
||||
configs = new GraphicsConfiguration[] {
|
||||
CGLGraphicsConfig.getConfig(this, 0)
|
||||
};
|
||||
}
|
||||
@ -66,7 +66,7 @@ public class CGraphicsDevice extends GraphicsDevice {
|
||||
*/
|
||||
@Override
|
||||
public GraphicsConfiguration[] getConfigurations() {
|
||||
return configs;
|
||||
return configs.clone();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -940,8 +940,8 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
|
||||
|
||||
@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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user