aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/egl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-06-21 20:14:46 +0200
committerSven Gothel <[email protected]>2012-06-21 20:14:46 +0200
commit1c05c85e1ccc480da227cd6aa4718efd386e1e35 (patch)
treee71f4cf6e02b5970d0625a3fa1cc0a57200a53ba /src/jogl/classes/jogamp/opengl/egl
parent533e072a592826df53b90491bcaa606dfddaf646 (diff)
JOGL CapabilitiesChooser-API and impl.: Cleanup using generics: 'List l' -> 'List<? extends CapabilitiesImmutable> l'
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java5
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java12
2 files changed, 9 insertions, 8 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
index 875bcb95b..56e7a4d22 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
@@ -38,6 +38,7 @@ package jogamp.opengl.egl;
import java.nio.IntBuffer;
import java.util.ArrayList;
+import java.util.List;
import javax.media.nativewindow.AbstractGraphicsDevice;
import javax.media.nativewindow.AbstractGraphicsScreen;
@@ -149,7 +150,7 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple
public static EGLGLCapabilities EGLConfig2Capabilities(GLProfile glp, long display, long config,
boolean relaxed, boolean onscreen, boolean usePBuffer, boolean forceTransparentFlag) {
- ArrayList bucket = new ArrayList();
+ List<GLCapabilitiesImmutable> bucket = new ArrayList<GLCapabilitiesImmutable>();
final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer);
if( EGLConfig2Capabilities(bucket, glp, display, config, winattrmask, forceTransparentFlag) ) {
return (EGLGLCapabilities) bucket.get(0);
@@ -159,7 +160,7 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple
return null;
}
- public static boolean EGLConfig2Capabilities(ArrayList capsBucket,
+ public static boolean EGLConfig2Capabilities(List<GLCapabilitiesImmutable> capsBucket,
GLProfile glp, long display, long config,
int winattrmask, boolean forceTransparentFlag) {
final int allDrawableTypeBits = EGLConfigDrawableTypeBits(display, config);
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
index 904110eb2..5ab2632c6 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
@@ -181,7 +181,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
EGLGraphicsDevice eglDevice = sharedResource.getDevice();
long eglDisplay = eglDevice.getHandle();
- List/*<EGLGLCapabilities>*/ availableCaps = null;
+ List<GLCapabilitiesImmutable> availableCaps = null;
IntBuffer numConfigs = Buffers.newDirectIntBuffer(1);
if(!EGL.eglGetConfigs(eglDisplay, null, 0, numConfigs)) {
@@ -316,7 +316,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
final boolean onscreen = capsChosen.isOnscreen();
final boolean usePBuffer = capsChosen.isPBuffer();
final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer);
- List/*<EGLGLCapabilities>*/ availableCaps = null;
+ List<GLCapabilitiesImmutable> availableCaps = null;
int recommendedIndex = -1;
long recommendedEGLConfig = -1;
IntBuffer numConfigs = Buffers.newDirectIntBuffer(1);
@@ -388,7 +388,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
}
if( VisualIDHolder.VID_UNDEFINED != nativeVisualID ) {
- List/*<EGLGLCapabilities>*/ removedCaps = new ArrayList();
+ List<GLCapabilitiesImmutable> removedCaps = new ArrayList<GLCapabilitiesImmutable>();
for(int i=0; i<availableCaps.size(); ) {
VisualIDHolder vidh = (VisualIDHolder) availableCaps.get(i);
if(vidh.getVisualID(VIDType.NATIVE) != nativeVisualID) {
@@ -421,15 +421,15 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
return new EGLGraphicsConfiguration(absScreen, chosenCaps, capsRequested, chooser);
}
- static List/*<GLCapabilitiesImmutable>*/ eglConfigs2GLCaps(GLProfile glp, long eglDisplay, PointerBuffer configs, int num, int winattrmask, boolean forceTransparentFlag) {
- ArrayList caps = new ArrayList(num);
+ static List<GLCapabilitiesImmutable> eglConfigs2GLCaps(GLProfile glp, long eglDisplay, PointerBuffer configs, int num, int winattrmask, boolean forceTransparentFlag) {
+ List<GLCapabilitiesImmutable> caps = new ArrayList<GLCapabilitiesImmutable>(num);
for(int i=0; i<num; i++) {
EGLGraphicsConfiguration.EGLConfig2Capabilities(caps, glp, eglDisplay, configs.get(i), winattrmask, forceTransparentFlag);
}
return caps;
}
- static void printCaps(String prefix, List/*GLCapabilitiesImmutable*/ caps, PrintStream out) {
+ static void printCaps(String prefix, List<GLCapabilitiesImmutable> caps, PrintStream out) {
for(int i=0; i<caps.size(); i++) {
out.println(prefix+"["+i+"] "+caps.get(i));
}