diff options
author | Sven Gothel <[email protected]> | 2014-07-03 16:21:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-03 16:21:36 +0200 |
commit | 556d92b63555a085b25e32b1cd55afce24edd07a (patch) | |
tree | 6be2b02c62a77d5aba81ffbe34c46960608be163 /src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java | |
parent | a90f4a51dffec3247278e3c683ed4462b1dd9ab5 (diff) |
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type
- Change indirect accesses to static members to direct accesses (accesses through subtypes)
- Add final modifier to private fields
- Add final modifier to method parameters
- Add final modifier to local variables
- Remove unnecessary casts
- Remove unnecessary '$NON-NLS$' tags
- Remove trailing white spaces on all lines
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java index 88ed0be92..1d90e63af 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java @@ -72,8 +72,8 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple return ((EGLGLCapabilities)capabilitiesChosen).getEGLConfigID(); } - EGLGraphicsConfiguration(AbstractGraphicsScreen absScreen, - EGLGLCapabilities capsChosen, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser) { + EGLGraphicsConfiguration(final AbstractGraphicsScreen absScreen, + final EGLGLCapabilities capsChosen, final GLCapabilitiesImmutable capsRequested, final GLCapabilitiesChooser chooser) { super(absScreen, capsChosen, capsRequested); this.chooser = chooser; } @@ -85,7 +85,7 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple * @return * @throws GLException if invalid EGL display. */ - public static EGLGraphicsConfiguration create(GLCapabilitiesImmutable capsRequested, AbstractGraphicsScreen absScreen, int eglConfigID) { + public static EGLGraphicsConfiguration create(final GLCapabilitiesImmutable capsRequested, final AbstractGraphicsScreen absScreen, final int eglConfigID) { final AbstractGraphicsDevice absDevice = absScreen.getDevice(); if(null==absDevice || !(absDevice instanceof EGLGraphicsDevice)) { throw new GLException("GraphicsDevice must be a valid EGLGraphicsDevice"); @@ -110,8 +110,8 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple } void updateGraphicsConfiguration() { - CapabilitiesImmutable capsChosen = getChosenCapabilities(); - EGLGraphicsConfiguration newConfig = (EGLGraphicsConfiguration) + final CapabilitiesImmutable capsChosen = getChosenCapabilities(); + final EGLGraphicsConfiguration newConfig = (EGLGraphicsConfiguration) GraphicsConfigurationFactory.getFactory(getScreen().getDevice(), capsChosen).chooseGraphicsConfiguration( capsChosen, getRequestedCapabilities(), chooser, getScreen(), VisualIDHolder.VID_UNDEFINED); if(null!=newConfig) { @@ -123,7 +123,7 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple } } - public static long EGLConfigId2EGLConfig(long display, int configID) { + public static long EGLConfigId2EGLConfig(final long display, final int configID) { final IntBuffer attrs = Buffers.newDirectIntBuffer(new int[] { EGL.EGL_CONFIG_ID, configID, EGL.EGL_NONE @@ -142,7 +142,7 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple return configs.get(0); } - public static boolean isEGLConfigValid(long display, long config) { + public static boolean isEGLConfigValid(final long display, final long config) { if(0 == config) { return false; } @@ -190,8 +190,8 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple * @param forceTransparentFlag * @return */ - public static EGLGLCapabilities EGLConfig2Capabilities(GLRendererQuirks defaultQuirks, EGLGraphicsDevice device, GLProfile glp, - long config, int winattrmask, boolean forceTransparentFlag) { + public static EGLGLCapabilities EGLConfig2Capabilities(final GLRendererQuirks defaultQuirks, final EGLGraphicsDevice device, GLProfile glp, + final long config, final int winattrmask, final boolean forceTransparentFlag) { final long display = device.getHandle(); final int cfgID; final int rType; @@ -267,7 +267,7 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple return null; } caps = new EGLGLCapabilities(config, cfgID, visualID, glp, rType); - } catch (GLException gle) { + } catch (final GLException gle) { if(DEBUG) { System.err.println("config "+toHexString(config)+": "+gle); } @@ -381,7 +381,7 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple return (EGLGLCapabilities) GLGraphicsConfigurationUtil.fixWinAttribBitsAndHwAccel(device, drawableTypeBits, caps); } - public static IntBuffer GLCapabilities2AttribList(GLCapabilitiesImmutable caps) { + public static IntBuffer GLCapabilities2AttribList(final GLCapabilitiesImmutable caps) { final IntBuffer attrs = Buffers.newDirectIntBuffer(32); int idx=0; @@ -480,8 +480,8 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple return attrs; } - public static IntBuffer CreatePBufferSurfaceAttribList(int width, int height, int texFormat) { - IntBuffer attrs = Buffers.newDirectIntBuffer(16); + public static IntBuffer CreatePBufferSurfaceAttribList(final int width, final int height, final int texFormat) { + final IntBuffer attrs = Buffers.newDirectIntBuffer(16); int idx=0; attrs.put(idx++, EGL.EGL_WIDTH); |