diff options
Diffstat (limited to 'src/nativewindow/classes')
-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(); } |