diff options
author | sg215889 <[email protected]> | 2009-07-29 10:49:00 -0700 |
---|---|---|
committer | sg215889 <[email protected]> | 2009-07-29 10:49:00 -0700 |
commit | d0e39bee266f0b715fe7ef711faff4783835c3d5 (patch) | |
tree | 4b6ca52ce6a4a0a44ece364f391301e9fd672aa5 /src/newt/native | |
parent | 8883fa885e68cd21e8b8cd3343db0580913aebdf (diff) |
Add BroadcomEGL verbose messages
Diffstat (limited to 'src/newt/native')
-rwxr-xr-x | src/newt/native/BroadcomEGL.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/newt/native/BroadcomEGL.c b/src/newt/native/BroadcomEGL.c index 764fa9b16..7ef73446e 100755 --- a/src/newt/native/BroadcomEGL.c +++ b/src/newt/native/BroadcomEGL.c @@ -58,7 +58,7 @@ EGLSurface EGLUtil_CreateWindowByNative( EGLDisplay eglDisplay, /* bool */ GLuin void EGLUtil_DestroyWindow( EGLDisplay eglDisplay, EGLSurface eglSurface ); void EGLUtil_SwapWindow( EGLDisplay eglDisplay, EGLSurface eglSurface ); -// #define VERBOSE_ON 1 +#define VERBOSE_ON 1 #ifdef VERBOSE_ON #define DBG_PRINT(...) fprintf(stdout, __VA_ARGS__) @@ -100,7 +100,11 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_newt_opengl_broadcom_BCEGLDisplay_Des EGLDisplay dpy = (EGLDisplay)(intptr_t)display; (void) env; (void) obj; + DBG_PRINT( "[DestroyDisplay] dpy %p\n", dpy); + EGLUtil_DestroyDisplay(dpy); + + DBG_PRINT( "[DestroyDisplay] X\n"); } /** @@ -130,6 +134,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_opengl_broadcom_BCEGLWindow_Cre fprintf(stderr, "[RealizeWindow] invalid display connection..\n"); return 0; } + DBG_PRINT( "[RealizeWindow.Create] dpy %p %ux%u\n", dpy, uiWidth, uiHeight); window = EGLUtil_CreateWindowByNative( dpy, chromaKey, &uiWidth, &uiHeight ); @@ -144,16 +149,20 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_opengl_broadcom_BCEGLWindow_Cre return 0; } (*env)->CallVoidMethod(env, obj, windowCreatedID, (jint) cfgID, (jint)uiWidth, (jint)uiHeight); - DBG_PRINT( "[RealizeWindow.Create] ok: %p, cfgid %d, %ux%u\n", window, cfgID, uiWidth, uiHeight); + DBG_PRINT( "[RealizeWindow.Create] ok: win %p, cfgid %d, %ux%u\n", window, cfgID, uiWidth, uiHeight); // release and destroy already made context .. EGLContext ctx = eglGetCurrentContext(); + DBG_PRINT( "[RealizeWindow.Create] ctx %p\n", ctx); eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - eglDestroyContext(dpy, ctx); + DBG_PRINT( "[RealizeWindow.Create] 2\n"); + eglDestroyContext(dpy, ctx); // culprit ? FIXME ? + DBG_PRINT( "[RealizeWindow.Create] X\n"); + return (jlong) (intptr_t) window; } @@ -162,9 +171,12 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_newt_opengl_broadcom_BCEGLWindow_Clos { EGLDisplay dpy = (EGLDisplay) (intptr_t) display; EGLSurface surf = (EGLSurface) (intptr_t) window; + + DBG_PRINT( "[CloseWindow] dpy %p, win %p\n", dpy, surf); + EGLUtil_DestroyWindow(dpy, surf); - DBG_PRINT( "[CloseWindow]\n"); + DBG_PRINT( "[CloseWindow] X\n"); } JNIEXPORT void JNICALL Java_com_sun_javafx_newt_opengl_broadcom_BCEGLWindow_SwapWindow @@ -172,8 +184,11 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_newt_opengl_broadcom_BCEGLWindow_Swap { EGLDisplay dpy = (EGLDisplay) (intptr_t) display; EGLSurface surf = (EGLSurface) (intptr_t) window; + + DBG_PRINT( "[SwapWindow] dpy %p, win %p\n", dpy, surf); + EGLUtil_SwapWindow( dpy, surf ); - DBG_PRINT( "[SwapWindow]\n"); + DBG_PRINT( "[SwapWindow] X\n"); } |