提交 c0b68b63 编写于 作者: L lana

Merge

......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册