summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-03-14 11:26:10 +0100
committerSven Gothel <[email protected]>2013-03-14 11:26:10 +0100
commitdd705f1eb14b87b207e375ea0d71e00155a9933f (patch)
tree131c131ea2fff2298e2306326ceced93f578ae06 /src/nativewindow/classes/jogamp
parent896e8b021b39e9415040a57a1d540d7d24b02db1 (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/nativewindow/classes/jogamp')
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java2
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
index c8f758165..758105713 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
@@ -117,7 +117,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface {
}
protected void attachSurfaceLayerImpl(final long layerHandle) {
- OSXUtil.AddCASublayer(rootSurfaceLayerHandle, layerHandle);
+ OSXUtil.AddCASublayer(rootSurfaceLayerHandle, layerHandle, getWidth(), getHeight());
}
protected void layoutSurfaceLayerImpl() {
diff --git a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java
index 59b42c249..1563a5a8b 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java
@@ -158,13 +158,14 @@ public class OSXUtil implements ToolkitProperties {
* @see #CreateCALayer(int, int, int, int)
* @see #RemoveCASublayer(long, long)
*/
- public static void AddCASublayer(final long rootCALayer, final long subCALayer) {
+ public static void AddCASublayer(final long rootCALayer, final long subCALayer, final int width, final int height) {
if(0==rootCALayer || 0==subCALayer) {
throw new IllegalArgumentException("rootCALayer 0x"+Long.toHexString(rootCALayer)+", subCALayer 0x"+Long.toHexString(subCALayer));
}
RunOnMainThread(false, new Runnable() {
public void run() {
AddCASublayer0(rootCALayer, subCALayer);
+ FixCALayerLayout0(rootCALayer, subCALayer, width, height);
}
});
}