From dd705f1eb14b87b207e375ea0d71e00155a9933f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 14 Mar 2013 11:26:10 +0100 Subject: OSX/CALayer: Simplify FixCALayerLayout()/layoutSurfaceLayer() call, no more need for explicit call - OffscreenLayerSurface.layoutSurfaceLayer() removed, no more required - JAWTWindow adds a ComponentListener, which issues FixCALayerLayout() at resized, moved and shown. - MyNSOpenGLLayer no more requires fix*Size() methods - MyNSOpenGLLayer::setDedicatedSize() need no explicit CATransaction, performed by caller. --- src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/jogl/classes') diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index 63c18db5d..278e2dc37 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -434,8 +434,9 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing _lock.lock(); try { final GLDrawable _drawable = drawable; - if( null == _drawable || realized && ( 0 >= _drawable.getWidth() || 0 >= _drawable.getHeight() ) ) { - return; + if( null == _drawable || realized == _drawable.isRealized() || + realized && ( 0 >= _drawable.getWidth() || 0 >= _drawable.getHeight() ) ) { + return; } _drawable.setRealized(realized); if( realized && _drawable.isRealized() ) { @@ -705,9 +706,6 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing } } sendReshape = true; // async if display() doesn't get called below, but avoiding deadlock - if(null != jawtWindow && jawtWindow.isOffscreenLayerSurfaceEnabled() ) { - jawtWindow.layoutSurfaceLayer(); - } } } } -- cgit v1.2.3