Bugzilla – Attachment 370 Details for
Bug 572
Calling invoke(true,GLRunnable) on several GLCanvases in the same container causes a deadlock
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
partial revert of commit 4b5a0f6557d7152ec770bc13ad3c494449de0529
GLCanvas-prevert-validateGLDrawable-4b5a0f6557d7152ec770bc13ad3c494449de0529.diff (text/plain), 3.11 KB, created by
Sven Gothel
on 2012-10-04 05:49:47 CEST
(
hide
)
Description:
partial revert of commit 4b5a0f6557d7152ec770bc13ad3c494449de0529
Filename:
MIME Type:
Creator:
Sven Gothel
Created:
2012-10-04 05:49:47 CEST
Size:
3.11 KB
patch
obsolete
>diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java >index 335322b..0f05a91 100644 >--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java >+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java >@@ -440,7 +440,14 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing > > @Override > public void display() { >+ if( !validateGLDrawable() ) { >+ if(DEBUG) { >+ System.err.println(getThreadName()+": Info: GLCanvas display - skipped GL render, drawable not valid yet"); >+ } >+ return; // not yet available .. >+ } > Threading.invoke(true, displayOnEDTAction, getTreeLock()); >+ > awtWindowClosingProtocol.addClosingListenerOneShot(); > } > >@@ -570,22 +577,29 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing > if( _drawable.isRealized() ) { > return true; > } >- if (!Beans.isDesignTime() && >- 0 < _drawable.getWidth() * _drawable.getHeight() ) { >- // make sure drawable realization happens on AWT EDT, due to AWTTree lock >- AWTEDTExecutor.singleton.invoke(getTreeLock(), true, setRealizedOnEDTAction); >- if( _drawable.isRealized() ) { >- sendReshape=true; // ensure a reshape is being send .. >- if(DEBUG) { >- System.err.println(getThreadName()+": Realized Drawable: "+_drawable.toString()); >- Thread.dumpStack(); >+ final RecursiveLock _lock = lock; >+ _lock.lock(); >+ try { >+ if (!Beans.isDesignTime() && >+ 0 < _drawable.getWidth() * _drawable.getHeight() ) { >+ // make sure drawable realization happens on AWT EDT, due to AWTTree lock >+ AWTEDTExecutor.singleton.invoke(getTreeLock(), true, setRealizedOnEDTAction); >+ if( _drawable.isRealized() ) { >+ sendReshape=true; // ensure a reshape is being send .. >+ if(DEBUG) { >+ System.err.println(getThreadName()+": Realized Drawable: "+_drawable.toString()); >+ Thread.dumpStack(); >+ } >+ return true; > } >- return true; > } >+ } finally { >+ _lock.unlock(); > } > } > return false; > } >+ > private Runnable setRealizedOnEDTAction = new Runnable() { > @Override > public void run() { >@@ -984,11 +998,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing > final RecursiveLock _lock = lock; > _lock.lock(); > try { >- if( validateGLDrawable() ) { >- helper.invokeGL(drawable, context, displayAction, initAction); >- } else if(DEBUG) { >- System.err.println(getThreadName()+": Info: GLCanvas display - skipped GL render, drawable not valid yet"); >- } >+ helper.invokeGL(drawable, context, displayAction, initAction); > } finally { > _lock.unlock(); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 572
:
348
| 370