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/x11/glx/X11PixmapGLXDrawable.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/x11/glx/X11PixmapGLXDrawable.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXDrawable.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXDrawable.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXDrawable.java index 42d76097c..e217e1c2a 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXDrawable.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXDrawable.java @@ -54,7 +54,7 @@ import jogamp.nativewindow.x11.XVisualInfo; public class X11PixmapGLXDrawable extends X11GLXDrawable { private long pixmap; - protected X11PixmapGLXDrawable(GLDrawableFactory factory, NativeSurface target) { + protected X11PixmapGLXDrawable(final GLDrawableFactory factory, final NativeSurface target) { super(factory, target, false); } @@ -68,26 +68,26 @@ public class X11PixmapGLXDrawable extends X11GLXDrawable { } @Override - public GLContext createContext(GLContext shareWith) { + public GLContext createContext(final GLContext shareWith) { return new X11GLXContext(this, shareWith); } private void createPixmap() { - NativeSurface ns = getNativeSurface(); - X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration) ns.getGraphicsConfiguration(); - XVisualInfo vis = config.getXVisualInfo(); - int bitsPerPixel = vis.getDepth(); - AbstractGraphicsScreen aScreen = config.getScreen(); - AbstractGraphicsDevice aDevice = aScreen.getDevice(); - long dpy = aDevice.getHandle(); - int screen = aScreen.getIndex(); + final NativeSurface ns = getNativeSurface(); + final X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration) ns.getGraphicsConfiguration(); + final XVisualInfo vis = config.getXVisualInfo(); + final int bitsPerPixel = vis.getDepth(); + final AbstractGraphicsScreen aScreen = config.getScreen(); + final AbstractGraphicsDevice aDevice = aScreen.getDevice(); + final long dpy = aDevice.getHandle(); + final int screen = aScreen.getIndex(); pixmap = X11Lib.XCreatePixmap(dpy, X11Lib.RootWindow(dpy, screen), surface.getSurfaceWidth(), surface.getSurfaceHeight(), bitsPerPixel); if (pixmap == 0) { throw new GLException("XCreatePixmap failed"); } - long drawable = GLX.glXCreateGLXPixmap(dpy, vis, pixmap); + final long drawable = GLX.glXCreateGLXPixmap(dpy, vis, pixmap); if (drawable == 0) { X11Lib.XFreePixmap(dpy, pixmap); pixmap = 0; @@ -104,7 +104,7 @@ public class X11PixmapGLXDrawable extends X11GLXDrawable { protected void destroyPixmap() { if (pixmap == 0) return; - NativeSurface ns = getNativeSurface(); + final NativeSurface ns = getNativeSurface(); long display = ns.getDisplayHandle(); long drawable = ns.getSurfaceHandle(); @@ -117,7 +117,7 @@ public class X11PixmapGLXDrawable extends X11GLXDrawable { // Must destroy pixmap and GLXPixmap if (DEBUG) { - long cur = GLX.glXGetCurrentContext(); + final long cur = GLX.glXGetCurrentContext(); if (cur != 0) { System.err.println("WARNING: found context " + toHexString(cur) + " current during pixmap destruction"); } |