aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
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/javax/media/opengl/DefaultGLCapabilitiesChooser.java
parent533e072a592826df53b90491bcaa606dfddaf646 (diff)
JOGL CapabilitiesChooser-API and impl.: Cleanup using generics: 'List l' -> 'List<? extends CapabilitiesImmutable> l'
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
index f678c709e..b57b85e5c 100644
--- a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
+++ b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
@@ -102,8 +102,9 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
final static int STENCIL_MISMATCH_PENALTY_SCALE = 3;
final static int MULTISAMPLE_MISMATCH_PENALTY_SCALE = 3;
+ @Override
public int chooseCapabilities(final CapabilitiesImmutable desired,
- final List /*<CapabilitiesImmutable>*/ available,
+ final List<? extends CapabilitiesImmutable> available,
final int windowSystemRecommendedChoice) {
if ( null == desired ) {
throw new NativeWindowException("Null desired capabilities");
@@ -144,7 +145,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
// Compute score for each
for (int i = 0; i < availnum; i++) {
- GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
+ final GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
if (cur == null) {
continue;
}
@@ -207,7 +208,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
if (score == NO_SCORE) {
continue;
}
- GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
+ final GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
if (cur.getHardwareAccelerated()) {
int absScore = Math.abs(score);
if (!gotHW ||
@@ -223,7 +224,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
if (score == NO_SCORE) {
continue;
}
- GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
+ final GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
if (!cur.getHardwareAccelerated()) {
if (score <= 0) {
score -= maxAbsoluteHWScore;