aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/classes/com/sun/opengl/impl/x11/X11GLContext.java4
-rw-r--r--src/classes/com/sun/opengl/impl/x11/X11GLDrawable.java4
-rw-r--r--src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java16
3 files changed, 14 insertions, 10 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/X11GLContext.java b/src/classes/com/sun/opengl/impl/x11/X11GLContext.java
index f8d35edd4..5ae52fb1d 100644
--- a/src/classes/com/sun/opengl/impl/x11/X11GLContext.java
+++ b/src/classes/com/sun/opengl/impl/x11/X11GLContext.java
@@ -292,10 +292,10 @@ public abstract class X11GLContext extends GLContextImpl {
// These synchronization primitives prevent the AWT from making
// requests from the X server asynchronously to this code.
protected void lockToolkit() {
- X11GLDrawableFactory.lockToolkit();
+ X11GLDrawableFactory.getX11Factory().lockToolkit();
}
protected void unlockToolkit() {
- X11GLDrawableFactory.unlockToolkit();
+ X11GLDrawableFactory.getX11Factory().unlockToolkit();
}
}
diff --git a/src/classes/com/sun/opengl/impl/x11/X11GLDrawable.java b/src/classes/com/sun/opengl/impl/x11/X11GLDrawable.java
index bfa467b10..6395bbce8 100644
--- a/src/classes/com/sun/opengl/impl/x11/X11GLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/x11/X11GLDrawable.java
@@ -163,10 +163,10 @@ public abstract class X11GLDrawable extends GLDrawableImpl {
// These synchronization primitives prevent the AWT from making
// requests from the X server asynchronously to this code.
protected void lockToolkit() {
- X11GLDrawableFactory.lockToolkit();
+ X11GLDrawableFactory.getX11Factory().lockToolkit();
}
protected void unlockToolkit() {
- X11GLDrawableFactory.unlockToolkit();
+ X11GLDrawableFactory.getX11Factory().unlockToolkit();
}
}
diff --git a/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java b/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java
index 90f5b9fe5..133431824 100644
--- a/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java
@@ -343,22 +343,22 @@ public class X11GLDrawableFactory extends GLDrawableFactoryImpl {
return res;
}
- public static void lockToolkit() {
+ public void lockToolkit() {
if (!Java2D.isOGLPipelineActive() || !Java2D.isQueueFlusherThread()) {
JAWT.getJAWT().Lock();
}
}
- public static void unlockToolkit() {
+ public void unlockToolkit() {
if (!Java2D.isOGLPipelineActive() || !Java2D.isQueueFlusherThread()) {
JAWT.getJAWT().Unlock();
}
}
- public void lockToolkitForJava2D() {
+ public void lockAWTForJava2D() {
lockToolkit();
}
- public void unlockToolkitForJava2D() {
+ public void unlockAWTForJava2D() {
unlockToolkit();
}
@@ -366,11 +366,11 @@ public class X11GLDrawableFactory extends GLDrawableFactoryImpl {
private static long staticDisplay;
public static long getDisplayConnection() {
if (staticDisplay == 0) {
- lockToolkit();
+ getX11Factory().lockToolkit();
try {
staticDisplay = GLX.XOpenDisplay(null);
} finally {
- unlockToolkit();
+ getX11Factory().unlockToolkit();
}
if (staticDisplay == 0) {
throw new GLException("Unable to open default display, needed for visual selection and offscreen surface handling");
@@ -414,6 +414,10 @@ public class X11GLDrawableFactory extends GLDrawableFactoryImpl {
return tmp[tmp_offset];
}
+ public static X11GLDrawableFactory getX11Factory() {
+ return (X11GLDrawableFactory) getFactory();
+ }
+
private void maybeDoSingleThreadedWorkaround(Runnable action) {
if (Threading.isSingleThreaded() &&
!Threading.isOpenGLThread()) {