diff options
author | Sven Gothel <[email protected]> | 2010-12-09 23:52:01 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-12-09 23:52:01 +0100 |
commit | 7753e1c5a50700771b1e0be4bc99c2585398e3ce (patch) | |
tree | e6bc3e502c568fc0dd31af41c003388c08a2447e /src | |
parent | db49722d704b1b2f607c5598cd71083e4fc4e28e (diff) |
NativeWindow: Expose lock test/get methods and constructor with HDC
Diffstat (limited to 'src')
-rw-r--r-- | src/nativewindow/classes/com/jogamp/nativewindow/impl/ProxySurface.java | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/impl/ProxySurface.java b/src/nativewindow/classes/com/jogamp/nativewindow/impl/ProxySurface.java index de766acbf..e0ad95e1f 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/impl/ProxySurface.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/impl/ProxySurface.java @@ -47,14 +47,21 @@ import com.jogamp.common.util.locks.RecursiveLock; public class ProxySurface implements NativeSurface, SurfaceChangeable { private RecursiveLock recurLock = new RecursiveLock(); - protected int width, height, scrnIndex; - protected long surfaceHandle, displayHandle; protected AbstractGraphicsConfiguration config; + protected long displayHandle; + protected long surfaceHandle; + protected int scrnIndex; + protected int width, height; public ProxySurface(AbstractGraphicsConfiguration cfg) { + this(cfg, 0); + } + + public ProxySurface(AbstractGraphicsConfiguration cfg, long handle) { invalidate(); config = cfg; displayHandle=cfg.getScreen().getDevice().getHandle(); + surfaceHandle=handle; scrnIndex=cfg.getScreen().getIndex(); } @@ -96,6 +103,14 @@ public class ProxySurface implements NativeSurface, SurfaceChangeable { recurLock.unlock(); } + public final void validateSurfaceLocked() { + recurLock.validateLocked(); + } + + public final int getSurfaceRecursionCount() { + return recurLock.getRecursionCount(); + } + public final boolean isSurfaceLockedByOtherThread() { return recurLock.isLockedByOtherThread(); } |