aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl/egl
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2010-04-23 02:10:28 +0200
committerSven Gothel <sgothel@jausoft.com>2010-04-23 02:10:28 +0200
commitb62a3af2d58ff52c0341f04cdc21d069a8051d31 (patch)
tree3c491020bafd650ebe3a09f4bcbc1c6d94c1f1be /src/jogl/classes/com/jogamp/opengl/impl/egl
parent2151f2179cd1ce5f0d42c3514af11a9c235762db (diff)
parent56679ab5373dc47286f741f07aeab4ec1f39c43b (diff)
Merge branch 'master' of github.com:mbien/jogl
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/egl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/egl/EGLOnscreenDrawable.java24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLOnscreenDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLOnscreenDrawable.java
index 3286367e5..3864fc39c 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLOnscreenDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLOnscreenDrawable.java
@@ -60,21 +60,19 @@ public class EGLOnscreenDrawable extends EGLDrawable {
protected void swapBuffersImpl() {
boolean didLock = false;
+ if (!isSurfaceLocked()) {
+ // Usually the surface shall be locked within [makeCurrent .. swap .. release]
+ if (lockSurface() == NativeWindow.LOCK_SURFACE_NOT_READY) {
+ return;
+ }
+ didLock = true;
+ }
try {
- if ( !isSurfaceLocked() ) {
- // Usually the surface shall be locked within [makeCurrent .. swap .. release]
- if (lockSurface() == NativeWindow.LOCK_SURFACE_NOT_READY) {
- return;
- }
- didLock = true;
- }
-
- EGL.eglSwapBuffers(eglDisplay, eglSurface);
-
+ EGL.eglSwapBuffers(eglDisplay, eglSurface);
} finally {
- if(didLock) {
- unlockSurface();
- }
+ if (didLock) {
+ unlockSurface();
+ }
}
}