aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/Capabilities.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java b/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java
index 5795e8cfe..d35f92fea 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java
@@ -157,11 +157,9 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable {
}
final CapabilitiesImmutable caps = (CapabilitiesImmutable) o; */
- final int a = ( alphaBits > 0 ) ? alphaBits : 1;
- final int rgba = redBits * greenBits * blueBits * a;
-
- final int xa = ( caps.getAlphaBits() ) > 0 ? caps.getAlphaBits() : 1;
- final int xrgba = caps.getRedBits() * caps.getGreenBits() * caps.getBlueBits() * xa;
+ final int rgba = redBits * greenBits * blueBits * ( alphaBits + 1 );
+
+ final int xrgba = caps.getRedBits() * caps.getGreenBits() * caps.getBlueBits() * ( caps.getAlphaBits() + 1 );
if(rgba > xrgba) {
return 1;