From 7753e1c5a50700771b1e0be4bc99c2585398e3ce Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 9 Dec 2010 23:52:01 +0100 Subject: NativeWindow: Expose lock test/get methods and constructor with HDC --- .../com/jogamp/nativewindow/impl/ProxySurface.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src') 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(); } -- cgit v1.2.3