diff options
Diffstat (limited to 'src/jogl/classes')
10 files changed, 147 insertions, 70 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java index 4f208ee85..826523a5c 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java @@ -732,7 +732,9 @@ public abstract class GLContextImpl extends GLContext { System.err.println(getThreadName() + ": !!! Initializing OpenGL extension address table for " + this); } if (glProcAddressTable == null) { - glProcAddressTable = (ProcAddressTable) createInstance(gl.getGLProfile(), "ProcAddressTable", new Class[0], null); + glProcAddressTable = (ProcAddressTable) createInstance(gl.getGLProfile(), "ProcAddressTable", + new Class[] { FunctionAddressResolver.class } , + new Object[] { new GLProcAddressResolver() } ); // FIXME: cache ProcAddressTables by capability bits so we can // share them among contexts with the same capabilities } diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java index 48f80977c..12d713036 100755 --- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java @@ -39,6 +39,7 @@ import javax.media.nativewindow.*; import javax.media.opengl.*; import com.jogamp.opengl.impl.*; import com.jogamp.gluegen.runtime.ProcAddressTable; +import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver; import java.nio.*; import java.util.*; @@ -239,7 +240,7 @@ public abstract class EGLContext extends GLContextImpl { if (eglExtProcAddressTable == null) { // FIXME: cache ProcAddressTables by capability bits so we can // share them among contexts with the same capabilities - eglExtProcAddressTable = new EGLExtProcAddressTable(); + eglExtProcAddressTable = new EGLExtProcAddressTable(new GLProcAddressResolver()); } resetProcAddressTable(getEGLExtProcAddressTable()); super.updateGLProcAddressTable(major, minor, ctp); diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java index ebefaf466..77cd21730 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java @@ -45,6 +45,7 @@ import javax.media.opengl.*; import javax.media.nativewindow.*; import com.jogamp.opengl.impl.*; import com.jogamp.gluegen.runtime.ProcAddressTable; +import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver; public abstract class MacOSXCGLContext extends GLContextImpl { @@ -262,7 +263,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl if (cglExtProcAddressTable == null) { // FIXME: cache ProcAddressTables by capability bits so we can // share them among contexts with the same capabilities - cglExtProcAddressTable = new CGLExtProcAddressTable(); + cglExtProcAddressTable = new CGLExtProcAddressTable(new GLProcAddressResolver()); } resetProcAddressTable(getCGLExtProcAddressTable()); super.updateGLProcAddressTable(major, minor, ctp); diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java index 0f1f9813f..360bddd74 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java @@ -45,6 +45,7 @@ import javax.media.opengl.*; import javax.media.nativewindow.*; import com.jogamp.opengl.impl.*; import com.jogamp.gluegen.runtime.ProcAddressTable; +import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver; public class WindowsWGLContext extends GLContextImpl { protected long hglrc; @@ -384,7 +385,7 @@ public class WindowsWGLContext extends GLContextImpl { if (wglExtProcAddressTable == null) { // FIXME: cache ProcAddressTables by capability bits so we can // share them among contexts with the same capabilities - wglExtProcAddressTable = new WGLExtProcAddressTable(); + wglExtProcAddressTable = new WGLExtProcAddressTable(new GLProcAddressResolver()); } resetProcAddressTable(getWGLExtProcAddressTable()); super.updateGLProcAddressTable(major, minor, ctp); diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/GLXUtil.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/GLXUtil.java index ec0eaf94f..804a262fe 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/GLXUtil.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/GLXUtil.java @@ -38,7 +38,7 @@ import com.jogamp.nativewindow.impl.x11.*; public class GLXUtil { public static boolean isMultisampleAvailable(long display) { - X11Lib.XLockDisplay(display); + X11Util.XLockDisplay(display); try { String exts = GLX.glXGetClientString(display, GLX.GLX_EXTENSIONS); if (exts != null) { @@ -46,18 +46,18 @@ public class GLXUtil { } return false; } finally { - X11Lib.XUnlockDisplay(display); + X11Util.XUnlockDisplay(display); } } /** Workaround for apparent issue with ATI's proprietary drivers where direct contexts still send GLX tokens for GL calls */ public static String getVendorName(long display) { - X11Lib.XLockDisplay(display); + X11Util.XLockDisplay(display); try { return GLX.glXGetClientString(display, GLX.GLX_VENDOR); } finally { - X11Lib.XUnlockDisplay(display); + X11Util.XUnlockDisplay(display); } } diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11DummyGLXDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11DummyGLXDrawable.java index 1f148bead..03783f3b9 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11DummyGLXDrawable.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11DummyGLXDrawable.java @@ -64,11 +64,11 @@ public class X11DummyGLXDrawable extends X11OnscreenGLXDrawable { int scrn = screen.getIndex(); long visualID = config.getVisualID(); - X11Lib.XLockDisplay(dpy); + X11Util.XLockDisplay(dpy); try{ dummyWindow = X11Lib.CreateDummyWindow(dpy, scrn, visualID); } finally { - X11Lib.XUnlockDisplay(dpy); + X11Util.XUnlockDisplay(dpy); } nw.setSurfaceHandle( dummyWindow ); } diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java index dce25978c..241c956dc 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java @@ -48,6 +48,7 @@ import com.jogamp.opengl.impl.*; import com.jogamp.opengl.impl.x11.glx.*; import com.jogamp.nativewindow.impl.x11.*; import com.jogamp.gluegen.runtime.ProcAddressTable; +import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver; public abstract class X11GLXContext extends GLContextImpl { protected long context; @@ -407,13 +408,14 @@ public abstract class X11GLXContext extends GLContextImpl { } protected void releaseImplAfterLock() throws GLException { - getDrawableImpl().getFactoryImpl().lockToolkit(); + X11GLXDrawableFactory factory = (X11GLXDrawableFactory)drawable.getFactoryImpl(); + factory.lockToolkit(); try { if (!glXMakeContextCurrent(drawable.getNativeWindow().getDisplayHandle(), 0, 0, 0)) { throw new GLException("Error freeing OpenGL context"); } } finally { - getDrawableImpl().getFactoryImpl().unlockToolkit(); + factory.unlockToolkit(); } } @@ -474,7 +476,7 @@ public abstract class X11GLXContext extends GLContextImpl { if (glXExtProcAddressTable == null) { // FIXME: cache ProcAddressTables by capability bits so we can // share them among contexts with the same capabilities - glXExtProcAddressTable = new GLXExtProcAddressTable(); + glXExtProcAddressTable = new GLXExtProcAddressTable(new GLProcAddressResolver()); } resetProcAddressTable(getGLXExtProcAddressTable()); super.updateGLProcAddressTable(major, minor, ctp); diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java index 5e1a5da3a..b544404ad 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java @@ -50,6 +50,10 @@ import com.jogamp.nativewindow.impl.x11.*; public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements DynamicLookupHelper { + static { + X11Util.initSingleton(); // ensure it's loaded and setup + } + public X11GLXDrawableFactory() { super(); // Must initialize GLX support eagerly in case a pbuffer is the @@ -63,26 +67,33 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna new Object[] {}); } catch (JogampRuntimeException jre) { /* n/a .. */ } - X11GraphicsDevice sharedDevice = new X11GraphicsDevice(X11Util.createThreadLocalDisplay(null)); - vendorName = GLXUtil.getVendorName(sharedDevice.getHandle()); - isVendorATI = GLXUtil.isVendorATI(vendorName); - isVendorNVIDIA = GLXUtil.isVendorNVIDIA(vendorName); - if( isVendorATI() ) { - X11Util.markGlobalDisplayUndeletable(sharedDevice.getHandle()); // ATI hack .. + shareableResourceThread = new ShareableResourceThread(GLProfile.getDefault(), GLProfile.isAWTJOGLAvailable()); + shareableResourceThread.start(); + while (!shareableResourceThread.isInitialized()) { + synchronized(shareableResourceThread) { + try { + shareableResourceThread.wait(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } } - sharedScreen = new X11GraphicsScreen(sharedDevice, 0); - X11Lib.XLockDisplay(sharedScreen.getDevice().getHandle()); + if(null==sharedScreen || null==sharedDrawable) { + throw new GLException("Couldn't init shared screen("+sharedScreen+")/drawable("+sharedDrawable+")"); + } + // We have to keep this within this thread, + // since we have a 'chicken-and-egg' problem otherwise on the <init> lock of this thread. + X11Util.XLockDisplay(sharedScreen.getDevice().getHandle()); try{ - sharedDrawable = new X11DummyGLXDrawable(sharedScreen, this, null); X11GLXContext ctx = (X11GLXContext) sharedDrawable.createContext(null); ctx.makeCurrent(); ctx.release(); sharedContext = ctx; - }finally{ - X11Lib.XUnlockDisplay(sharedScreen.getDevice().getHandle()); + } finally { + X11Util.XUnlockDisplay(sharedScreen.getDevice().getHandle()); } if(null==sharedContext) { - throw new GLException("Couldn't init shared resources"); + throw new GLException("Couldn't init shared context"); } if (DEBUG) { System.err.println("!!! Vendor: "+vendorName+", ATI: "+isVendorATI+", NV: "+isVendorNVIDIA); @@ -91,6 +102,71 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna } } + ShareableResourceThread shareableResourceThread; + + class ShareableResourceThread extends Thread { + volatile boolean shutdown = false; + volatile boolean initialized = false; + GLProfile glp; + boolean mayUseAWT; + + final void shutdown() { shutdown = true; } + final boolean isInitialized() { return initialized; } + + public ShareableResourceThread(GLProfile glp, boolean mayUseAWT) { + super("ShareableResourceThread-"+Thread.currentThread().getName()); + this.glp = glp; + this.mayUseAWT = mayUseAWT; + } + + public void run() { + synchronized(this) { + long tlsDisplay = X11Util.createThreadLocalDisplay(null); + X11GraphicsDevice sharedDevice = new X11GraphicsDevice(tlsDisplay); + vendorName = GLXUtil.getVendorName(sharedDevice.getHandle()); + isVendorATI = GLXUtil.isVendorATI(vendorName); + isVendorNVIDIA = GLXUtil.isVendorNVIDIA(vendorName); + sharedScreen = new X11GraphicsScreen(sharedDevice, 0); + X11Util.XLockDisplay(sharedScreen.getDevice().getHandle()); + try{ + sharedDrawable = new X11DummyGLXDrawable(sharedScreen, X11GLXDrawableFactory.this, glp); + } finally { + X11Util.XUnlockDisplay(sharedScreen.getDevice().getHandle()); + } + if(isVendorATI() && mayUseAWT) { + X11Util.markThreadLocalDisplayUncloseable(tlsDisplay); // failure to close with ATI and AWT usage + } + initialized = true; + this.notifyAll(); + + while (!shutdown) { + synchronized(this) { + try { + this.wait(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } + + if(null!=sharedDrawable) { + sharedDrawable.destroy(); + sharedDrawable=null; + } + if(null!=sharedScreen) { + X11Util.closeThreadLocalDisplay(null); + sharedScreen = null; + sharedDevice=null; + } + // don't close pending XDisplay, since they might be a different thread as the opener + X11Util.shutdown( false, DEBUG ); + + initialized = false; + this.notifyAll(); + } + } + } + private X11GraphicsScreen sharedScreen; private String vendorName; private boolean isVendorATI; @@ -112,36 +188,36 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna } protected void shutdown() { - if (DEBUG) { + if (DEBUG) { System.err.println("!!! Shutdown Shared:"); System.err.println("!!! CTX : "+sharedContext); System.err.println("!!! Drawable: "+sharedDrawable); System.err.println("!!! Screen : "+sharedScreen); - Exception e = new Exception("Debug"); - e.printStackTrace(); - } - if(null!=sharedContext) { + } + if(null!=sharedContext) { sharedContext.destroy(); // implies release, if current - } - if(null!=sharedDrawable) { - sharedDrawable.destroy(); - } - if(null!=sharedScreen) { - X11GraphicsDevice sharedDevice = (X11GraphicsDevice) sharedScreen.getDevice(); - sharedScreen = null; - } - // X11Util.shutdown( !isVendorATI(), DEBUG ); // works NV .. but .. - // X11Util.shutdown( true, DEBUG ); // fails ATI, works NV .. but - X11Util.shutdown( false, DEBUG ); + sharedContext=null; + } + synchronized(shareableResourceThread) { + if (shareableResourceThread.isInitialized()) { + shareableResourceThread.shutdown(); + shareableResourceThread.notifyAll(); + while (shareableResourceThread.isInitialized()) { + try { + shareableResourceThread.wait(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } + } + shareableResourceThread = null; } public GLDrawableImpl createOnscreenDrawable(NativeWindow target) { if (target == null) { throw new IllegalArgumentException("Null target"); } - if( isVendorATI() ) { - X11Util.markGlobalDisplayUndeletable(target.getDisplayHandle()); // ATI hack .. - } return new X11OnscreenGLXDrawable(this, target); } @@ -149,9 +225,6 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna if (target == null) { throw new IllegalArgumentException("Null target"); } - if( isVendorATI() ) { - X11Util.markGlobalDisplayUndeletable(target.getDisplayHandle()); // ATI hack .. - } return new X11OffscreenGLXDrawable(this, target); } @@ -204,9 +277,6 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna sharedContext.makeCurrent(); usedSharedContext=true; } - if( isVendorATI() ) { - X11Util.markGlobalDisplayUndeletable(target.getDisplayHandle()); // ATI hack .. - } try { pbufferDrawable = new X11PbufferGLXDrawable(this, target); } finally { @@ -220,11 +290,11 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna protected NativeWindow createOffscreenWindow(GLCapabilities capabilities, GLCapabilitiesChooser chooser, int width, int height) { NullWindow nw = null; - X11Lib.XLockDisplay(sharedScreen.getDevice().getHandle()); + X11Util.XLockDisplay(sharedScreen.getDevice().getHandle()); try{ nw = new NullWindow(X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capabilities, chooser, sharedScreen)); }finally{ - X11Lib.XUnlockDisplay(sharedScreen.getDevice().getHandle()); + X11Util.XUnlockDisplay(sharedScreen.getDevice().getHandle()); } if(nw != null) { nw.setSize(width, height); @@ -280,7 +350,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna long display = sharedScreen.getDevice().getHandle(); - X11Lib.XLockDisplay(display); + X11Util.XLockDisplay(display); try { int[] size = new int[1]; boolean res = X11Lib.XF86VidModeGetGammaRampSize(display, @@ -293,7 +363,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna gammaRampLength = size[0]; return gammaRampLength; } finally { - X11Lib.XUnlockDisplay(display); + X11Util.XUnlockDisplay(display); } } @@ -305,7 +375,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna } long display = sharedScreen.getDevice().getHandle(); - X11Lib.XLockDisplay(display); + X11Util.XLockDisplay(display); try { boolean res = X11Lib.XF86VidModeSetGammaRamp(display, X11Lib.DefaultScreen(display), @@ -315,7 +385,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna rampData, 0); return res; } finally { - X11Lib.XUnlockDisplay(display); + X11Util.XUnlockDisplay(display); } } @@ -332,7 +402,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna rampData.limit(3 * size); ShortBuffer blueRampData = rampData.slice(); long display = sharedScreen.getDevice().getHandle(); - X11Lib.XLockDisplay(display); + X11Util.XLockDisplay(display); try { boolean res = X11Lib.XF86VidModeGetGammaRamp(display, X11Lib.DefaultScreen(display), @@ -345,7 +415,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna } return rampData; } finally { - X11Lib.XUnlockDisplay(display); + X11Util.XUnlockDisplay(display); } } @@ -368,7 +438,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna rampData.limit(3 * size); ShortBuffer blueRampData = rampData.slice(); long display = sharedScreen.getDevice().getHandle(); - X11Lib.XLockDisplay(display); + X11Util.XLockDisplay(display); try { X11Lib.XF86VidModeSetGammaRamp(display, X11Lib.DefaultScreen(display), @@ -377,7 +447,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna greenRampData, blueRampData); } finally { - X11Lib.XUnlockDisplay(display); + X11Util.XUnlockDisplay(display); } } } diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java index e65fb5e90..a160734d3 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java @@ -81,7 +81,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac long display = x11Screen.getDevice().getHandle(); NativeWindowFactory.getDefaultFactory().getToolkitLock().lock(); - X11Lib.XLockDisplay(display); + X11Util.XLockDisplay(display); try { int screen = x11Screen.getIndex(); boolean isMultisampleAvailable = GLXUtil.isMultisampleAvailable(display); @@ -107,7 +107,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac } } catch (Throwable t) { } finally { - X11Lib.XUnlockDisplay(display); + X11Util.XUnlockDisplay(display); NativeWindowFactory.getDefaultFactory().getToolkitLock().unlock(); } @@ -191,7 +191,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac NativeWindowFactory.getDefaultFactory().getToolkitLock().lock(); try { - X11Lib.XLockDisplay(display); + X11Util.XLockDisplay(display); try{ int screen = x11Screen.getIndex(); boolean isMultisampleAvailable = GLXUtil.isMultisampleAvailable(display); @@ -292,7 +292,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac } } }finally{ - X11Lib.XUnlockDisplay(display); + X11Util.XUnlockDisplay(display); } } finally { NativeWindowFactory.getDefaultFactory().getToolkitLock().unlock(); @@ -324,7 +324,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac NativeWindowFactory.getDefaultFactory().getToolkitLock().lock(); try { - X11Lib.XLockDisplay(display); + X11Util.XLockDisplay(display); try{ int screen = x11Screen.getIndex(); boolean isMultisampleAvailable = GLXUtil.isMultisampleAvailable(display); @@ -377,7 +377,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac } retXVisualInfo = XVisualInfo.create(infos[chosen]); }finally{ - X11Lib.XUnlockDisplay(display); + X11Util.XUnlockDisplay(display); } } finally { NativeWindowFactory.getDefaultFactory().getToolkitLock().unlock(); diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java index 14d07e74f..5771e9c42 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java @@ -75,7 +75,7 @@ public class X11OffscreenGLXDrawable extends X11GLXDrawable { getFactoryImpl().lockToolkit(); try { - X11Lib.XLockDisplay(dpy); + X11Util.XLockDisplay(dpy); try{ pixmap = X11Lib.XCreatePixmap(dpy, X11Lib.RootWindow(dpy, screen), @@ -96,7 +96,7 @@ public class X11OffscreenGLXDrawable extends X11GLXDrawable { ", display " + toHexString(dpy)); } }finally{ - X11Lib.XUnlockDisplay(dpy); + X11Util.XUnlockDisplay(dpy); } } finally { getFactoryImpl().unlockToolkit(); @@ -111,7 +111,7 @@ public class X11OffscreenGLXDrawable extends X11GLXDrawable { getFactoryImpl().lockToolkit(); try { - X11Lib.XLockDisplay(display); + X11Util.XLockDisplay(display); try{ long drawable = nw.getSurfaceHandle(); if (DEBUG) { @@ -142,7 +142,7 @@ public class X11OffscreenGLXDrawable extends X11GLXDrawable { ((SurfaceChangeable)nw).setSurfaceHandle(0); }finally{ - X11Lib.XUnlockDisplay(display); + X11Util.XUnlockDisplay(display); } } finally { getFactoryImpl().unlockToolkit(); |