summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java20
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java9
2 files changed, 4 insertions, 25 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
index f7389d42e..89907ba15 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
@@ -48,8 +48,6 @@ import java.util.Map;
import javax.media.nativewindow.AbstractGraphicsConfiguration;
import javax.media.nativewindow.AbstractGraphicsDevice;
import javax.media.nativewindow.NativeSurface;
-import javax.media.nativewindow.NativeWindowFactory;
-import javax.media.nativewindow.ToolkitLock;
import javax.media.opengl.GLCapabilitiesImmutable;
import javax.media.opengl.GLContext;
import javax.media.opengl.GLException;
@@ -182,16 +180,10 @@ public abstract class X11GLXContext extends GLContextImpl {
@Override
protected void destroyContextARBImpl(long ctx) {
- final ToolkitLock tkLock = NativeWindowFactory.getGlobalToolkitLockIfRequired();
- tkLock.lock();
- try {
- long display = drawable.getNativeSurface().getDisplayHandle();
-
- glXMakeContextCurrent(display, 0, 0, 0);
- GLX.glXDestroyContext(display, ctx);
- } finally {
- tkLock.unlock();
- }
+ final long display = drawable.getNativeSurface().getDisplayHandle();
+
+ glXMakeContextCurrent(display, 0, 0, 0);
+ GLX.glXDestroyContext(display, ctx);
}
private static final int ctx_arb_attribs_idx_major = 0;
private static final int ctx_arb_attribs_idx_minor = 2;
@@ -250,8 +242,6 @@ public abstract class X11GLXContext extends GLContextImpl {
AbstractGraphicsDevice device = config.getScreen().getDevice();
final long display = device.getHandle();
- final ToolkitLock tkLock = NativeWindowFactory.getGlobalToolkitLockIfRequired();
- tkLock.lock();
try {
// critical path, a remote display might not support this command,
// hence we need to catch the X11 Error within this block.
@@ -262,8 +252,6 @@ public abstract class X11GLXContext extends GLContextImpl {
Throwable t = new Throwable(getThreadName()+": Info: X11GLXContext.createContextARBImpl glXCreateContextAttribsARB failed with "+getGLVersion(major, minor, ctp, "@creation"), re);
t.printStackTrace();
}
- } finally {
- tkLock.unlock();
}
if(0!=ctx) {
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
index 006ee4c97..37d408990 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
@@ -42,7 +42,6 @@ import java.util.HashMap;
import java.util.Map;
import jogamp.nativewindow.Debug;
-import jogamp.nativewindow.GlobalToolkitLock;
import jogamp.nativewindow.NativeWindowFactoryImpl;
import jogamp.nativewindow.ToolkitProperties;
import jogamp.nativewindow.ResourceToolkitLock;
@@ -376,14 +375,6 @@ public abstract class NativeWindowFactory {
}
/**
- * Ony call this for small code segments for desktop w/ threading issues.
- * @return {@link GlobalToolkitLock} if desktop has threading issues, otherwise {@link #getNullToolkitLock()}
- */
- public static ToolkitLock getGlobalToolkitLockIfRequired() {
- return desktopHasThreadingIssues ? GlobalToolkitLock.getSingleton() : getNullToolkitLock();
- }
-
- /**
* Provides the system default {@link ToolkitLock} for the default system windowing type.
* @see #getNativeWindowType(boolean)
* @see #getDefaultToolkitLock(java.lang.String)