diff options
author | Sven Gothel <[email protected]> | 2012-06-28 21:39:37 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-06-28 21:39:37 +0200 |
commit | 3334a924309a9361a448d69bc707d4cce416b430 (patch) | |
tree | 462e2c022c229a7a738b97e215f93e6370f4cc92 /src/newt/classes/jogamp | |
parent | bc7503c77892a9e14b10e8b8e9ce48b148c6fa4c (diff) |
NEWT GLWindow multithreading fix and annotations (see commit bc7503c77892a9e14b10e8b8e9ce48b148c6fa4c).
NEWT GLWindow multithreading fix:
- Add required locking of display(), otherwise a drawable/context destruction of another threads
could lead to [still] use asynced data.
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index baad77ffb..34f248121 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -618,6 +618,13 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer return surfaceLock.getOwner(); } + public final void lockWindow() { + windowLock.lock(); + } + public final void unlockWindow() { + windowLock.unlock(); + } + public final boolean isWindowLockedByOtherThread() { return windowLock.isLockedByOtherThread(); } |