From 1c05c85e1ccc480da227cd6aa4718efd386e1e35 Mon Sep 17 00:00:00 2001 From: Sven Gothel <sgothel@jausoft.com> Date: Thu, 21 Jun 2012 20:14:46 +0200 Subject: JOGL CapabilitiesChooser-API and impl.: Cleanup using generics: 'List l' -> 'List<? extends CapabilitiesImmutable> l' --- .../classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java') 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; -- cgit v1.2.3