aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun/opengl/impl/windows')
-rw-r--r--src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLContext.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLContext.java b/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLContext.java
index 4e1dbd1c0..4f41cd8e1 100644
--- a/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLContext.java
+++ b/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLContext.java
@@ -66,7 +66,19 @@ public class WindowsOnscreenGLContext extends WindowsGLContext {
int ret = super.makeCurrentImpl();
return ret;
} finally {
- if (lockRes != WindowsOnscreenGLDrawable.LOCK_SURFACE_NOT_READY) {
+ if (isOptimizable()) {
+ if (lockRes != WindowsOnscreenGLDrawable.LOCK_SURFACE_NOT_READY) {
+ drawable.unlockSurface();
+ }
+ }
+ }
+ }
+
+ protected void releaseImpl() throws GLException {
+ try {
+ super.releaseImpl();
+ } finally {
+ if (!isOptimizable()) {
drawable.unlockSurface();
}
}