diff options
author | Sven Gothel <[email protected]> | 2012-06-27 05:05:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-06-27 05:05:36 +0200 |
commit | a06e40cce89615eb8c4b080842997c9c3ad1130b (patch) | |
tree | 0bac563f3604662f8583b4f0da21b68ac53abd28 /src/jogl/classes | |
parent | 4a0a5d69ffcb7592b092991ddb3761653c389ce6 (diff) |
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
Diffstat (limited to 'src/jogl/classes')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 6 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLDrawableImpl.java | 4 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLPbufferImpl.java | 4 |
3 files changed, 3 insertions, 11 deletions
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"); |