From 3a6f6fd237505e8ced20b64579cca42e61751c51 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 11 Nov 2011 04:57:45 +0100 Subject: Minor edits: Remove dead code / fix dbg printf --- .../opengl/macosx/cgl/MacOSXCGLDrawable.java | 52 ---------------------- src/nativewindow/native/macosx/OSXmisc.m | 2 +- 2 files changed, 1 insertion(+), 53 deletions(-) diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java index a97f3b1b2..7ee0d4fbe 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java @@ -123,58 +123,6 @@ public abstract class MacOSXCGLDrawable extends GLDrawableImpl { return GLBackendType.NSOPENGL == openGLMode ? getHandle() : null; } - /** - @Override - protected void destroyHandle() { - if(layeredSurfaceType == LayeredSurfaceType.Direct) { - // direct surface host, eg. AWT GLCanvas - final MacOSXJAWTWindow lsh = MacOSXCGLDrawableFactory.getLayeredSurfaceHost(surface); - if (DEBUG) { - System.err.println("destroyHandle: layerType " + layeredSurfaceType + ", backingLayer "+toHexString(lsh.getSurfaceHandle()) + " -> 0"); - } - OSXUtil.DestroyNSView(lsh.getSurfaceHandle()); - // CGL.releaseNSOpenGLView(lsh.getSurfaceHandle()); - lsh.setSurfaceHandle(0); - } else if (DEBUG) { - System.err.println("destroyHandle: layerType " + layeredSurfaceType); - } - super.destroyHandle(); - } - - @Override - protected void updateHandle() { - final MacOSXJAWTWindow lsh = MacOSXCGLDrawableFactory.getLayeredSurfaceHost(surface); - if (null != lsh) { - if(lsh == surface) { - // direct surface host, eg. AWT GLCanvas - layeredSurfaceType = LayeredSurfaceType.Direct; - final long oldNSView = lsh.getSurfaceHandle(); - if(0 != oldNSView) { - OSXUtil.DestroyNSView(oldNSView); - // CGL.releaseNSOpenGLView(oldNSView); - } - final long nsView = OSXUtil.CreateNSView(0, 0, getWidth(), getHeight()); - // final long nsView = CGL.createNSOpenGLView(0, 0, getWidth(), getHeight()); - lsh.setSurfaceHandle(nsView); - if (DEBUG) { - System.err.println("updateHandle: layerType " + layeredSurfaceType + ", backingLayer "+toHexString(oldNSView) + " -> "+toHexString(nsView)); - } - } else { - // parent surface host, eg. via native parenting w/ NewtCanvasAWT - layeredSurfaceType = LayeredSurfaceType.Parented; - if (DEBUG) { - System.err.println("updateHandle: layerType " + layeredSurfaceType + ", backingLayer "+toHexString(getHandle())); - } - } - } else { - layeredSurfaceType = LayeredSurfaceType.None; - if (DEBUG) { - System.err.println("updateHandle: layerType " + layeredSurfaceType); - } - } - super.updateHandle(); - } */ - @Override protected void updateHandle() { final MacOSXJAWTWindow lsh = MacOSXCGLDrawableFactory.getLayeredSurfaceHost(surface); diff --git a/src/nativewindow/native/macosx/OSXmisc.m b/src/nativewindow/native/macosx/OSXmisc.m index 7b7897701..de0d278fd 100644 --- a/src/nativewindow/native/macosx/OSXmisc.m +++ b/src/nativewindow/native/macosx/OSXmisc.m @@ -273,7 +273,7 @@ JNIEXPORT void JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_AddCASublayer0 CGRect lRectRoot = [rootLayer frame]; // simple 1:1 layout ! [subLayer setFrame:lRectRoot]; - DBG_PRINT("CALayer::AddCASublayer0.0: %p . %p %lf/%lf %lfx%lf (%lf/%lf %lfx%lf) (refcnt %d)\n", + DBG_PRINT("CALayer::AddCASublayer0.0: %p . %p %lf/%lf %lfx%lf (refcnt %d)\n", rootLayer, subLayer, lRectRoot.origin.x, lRectRoot.origin.y, lRectRoot.size.width, lRectRoot.size.height, (int)[subLayer retainCount]); [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ [rootLayer addSublayer:subLayer]; -- cgit v1.2.3