aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl/impl/GLPbufferImpl.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-08-30 06:48:11 +0000
committerKenneth Russel <[email protected]>2005-08-30 06:48:11 +0000
commite6ac069b68dc1722e4ba59738fb57e8e43f55245 (patch)
treef212dfeb489613b49388c7093b35328a9e7cb3cb /src/net/java/games/jogl/impl/GLPbufferImpl.java
parent8c99f91eeca27b410ac81bcdfc19f46b517bde1c (diff)
Merged in some work from Java2D/JOGL integration workspace
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JSR-231@356 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/impl/GLPbufferImpl.java')
-rw-r--r--src/net/java/games/jogl/impl/GLPbufferImpl.java19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/net/java/games/jogl/impl/GLPbufferImpl.java b/src/net/java/games/jogl/impl/GLPbufferImpl.java
index fbbf6c519..35a8ac79f 100644
--- a/src/net/java/games/jogl/impl/GLPbufferImpl.java
+++ b/src/net/java/games/jogl/impl/GLPbufferImpl.java
@@ -198,22 +198,9 @@ public class GLPbufferImpl implements GLPbuffer {
private void maybeDoSingleThreadedWorkaround(Runnable eventDispatchThreadAction,
Runnable invokeGLAction,
boolean isReshape) {
- if (SingleThreadedWorkaround.doWorkaround() && !EventQueue.isDispatchThread()) {
- try {
- // Reshape events must not block on the event queue due to the
- // possibility of deadlocks during initial component creation.
- // This solution is not optimal, because it changes the
- // semantics of reshape() to have some of the processing being
- // done asynchronously, but at least it preserves the
- // semantics of the single-threaded workaround.
- if (!isReshape) {
- EventQueue.invokeAndWait(eventDispatchThreadAction);
- } else {
- EventQueue.invokeLater(eventDispatchThreadAction);
- }
- } catch (Exception e) {
- throw new GLException(e);
- }
+ if (SingleThreadedWorkaround.doWorkaround() &&
+ !SingleThreadedWorkaround.isOpenGLThread()) {
+ SingleThreadedWorkaround.invokeOnOpenGLThread(eventDispatchThreadAction);
} else {
drawableHelper.invokeGL(pbufferDrawable, context, invokeGLAction, initAction);
}