From a06e40cce89615eb8c4b080842997c9c3ad1130b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 27 Jun 2012 05:05:36 +0200 Subject: NativeSurface Cleanup (API Change) - Adapt to GlueGen Lock cleanup commit: 834b9e530e652b7ff7c5e222720bce3ad2b11c5f - adapt to GlueGen Lock cleanup - remove isSurfaceLocked(), use 'null != getSurfaceLockOwner()' instead Misc: - remove unused priv./impl. methods - add @Override --- src/jogl/classes/jogamp/opengl/GLContextImpl.java | 6 +++--- src/jogl/classes/jogamp/opengl/GLDrawableImpl.java | 4 ---- src/jogl/classes/jogamp/opengl/GLPbufferImpl.java | 4 ---- 3 files changed, 3 insertions(+), 11 deletions(-) (limited to 'src/jogl/classes') diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 51201b3a9..ff1b65520 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -164,7 +164,7 @@ public abstract class GLContextImpl extends GLContext { if(null!=read && drawable!=read && !isGLReadDrawableAvailable()) { throw new GLException("GL Read Drawable not available"); } - boolean lockHeld = lock.isOwner(); + final boolean lockHeld = lock.isOwner(Thread.currentThread()); if(lockHeld) { release(); } @@ -224,8 +224,8 @@ public abstract class GLContextImpl extends GLContext { if(TRACE_SWITCH) { System.err.println(getThreadName() +": GLContext.ContextSwitch: - release() - force: "+force+", "+lock); } - if ( !lock.isOwner() ) { - throw new GLException("Context not current on current thread "+Thread.currentThread().getName()+": "+this); + if ( !lock.isOwner(Thread.currentThread()) ) { + throw new GLException("Context not current on current thread "+Thread.currentThread().getName()+": "+this); } final boolean actualRelease = force || lock.getHoldCount() == 1 ; try { diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java index 36f17e5a1..71624789d 100644 --- a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java @@ -199,10 +199,6 @@ public abstract class GLDrawableImpl implements GLDrawable { surface.unlockSurface(); } - public boolean isSurfaceLocked() { - return surface.isSurfaceLocked(); - } - public String toString() { return getClass().getSimpleName()+"[Realized "+isRealized()+ ",\n\tFactory "+getFactory()+ diff --git a/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java b/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java index 0f4f7f8e2..9a4cf1f94 100644 --- a/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java @@ -267,10 +267,6 @@ public class GLPbufferImpl implements GLPbuffer { recurLock.unlock(); } - public boolean isSurfaceLocked() { - return recurLock.isLocked(); - } - public int getFloatingPointMode() { if (floatMode == 0) { throw new GLException("Pbuffer not initialized, or floating-point support not requested"); -- cgit v1.2.3