diff options
author | Sven Gothel <[email protected]> | 2013-03-14 11:26:10 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-03-14 11:26:10 +0100 |
commit | dd705f1eb14b87b207e375ea0d71e00155a9933f (patch) | |
tree | 131c131ea2fff2298e2306326ceced93f578ae06 /src/jogl/classes/javax/media/opengl | |
parent | 896e8b021b39e9415040a57a1d540d7d24b02db1 (diff) |
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.
Diffstat (limited to 'src/jogl/classes/javax/media/opengl')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 8 |
1 files changed, 3 insertions, 5 deletions
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(); - } } } } |