evas-gl-drm: Cleanup compiler warnings for dbg/err messages
authorChris Michael <cp.michael@samsung.com>
Sun, 1 Mar 2015 15:45:39 +0000 (10:45 -0500)
committerChris Michael <cp.michael@samsung.com>
Sun, 1 Mar 2015 15:45:39 +0000 (10:45 -0500)
Summary: This commit compiles out the debug messages that were
generating compiler warnings during build. You can reenable these
messages if you uncomment GL_DRM_DBG in evas_engine.h

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/modules/evas/engines/gl_drm/evas_drm_main.c
src/modules/evas/engines/gl_drm/evas_engine.c
src/modules/evas/engines/gl_drm/evas_engine.h

index 67b1648..d0fe125 100644 (file)
@@ -118,7 +118,10 @@ eng_window_new(Evas_Engine_Info_GL_Drm *info, Evas *e, struct gbm_device *gbm, s
    config_attrs[n++] = EGL_OPENGL_ES2_BIT;
    config_attrs[n++] = EGL_NONE;
 
+#ifdef GL_DRM_DBG
    DBG("GBM DEVICE: %x", (unsigned int)gbm);
+#endif
+
    gw->egl_disp = eglGetDisplay((EGLNativeDisplayType)(gw->gbm));
    if (gw->egl_disp  == EGL_NO_DISPLAY)
      {
index 6e4b119..2152e88 100644 (file)
@@ -600,9 +600,11 @@ eng_setup(Evas *eo_e, void *in)
         if (!(info->info.gbm) || !(info->info.surface))
           return 0;
 
+#ifdef GL_DRM_DBG
         DBG("FD: %d, GBM_DEVICE: 0x%x, GBM_SURFACE: 0x%x",
             info->info.fd, (unsigned int)info->info.gbm,
             (unsigned int)info->info.surface);
+#endif
 
         re = calloc(1, sizeof(Render_Engine));
         if (!re) return 0;
@@ -724,9 +726,11 @@ eng_setup(Evas *eo_e, void *in)
                   if (!evas_drm_gbm_init(info, epd->output.w, epd->output.h))
                     return 0;
 
+#ifdef GL_DRM_DBG
                   DBG("FD: %d, GBM_DEVICE: 0x%x, GBM_SURFACE: 0x%x",
                       info->info.fd, (unsigned int)info->info.gbm,
                       (unsigned int)info->info.surface);
+#endif
 
                   ob = eng_window_new(info, eo_e, info->info.gbm,
                                       info->info.surface, info->info.screen,
@@ -1107,7 +1111,7 @@ eng_image_native_set(void *data, void *image, void *native)
 
                   if (!n->egl_surface)
                     {
-                       ERR("eglCreatePixmapSurface() for 0x%x failed", (unsigned int)wl_buf);
+                       ERR("eglCreatePixmapSurface() for %p failed", wl_buf);
                        eina_hash_del(ob->gl_context->shared->native_wl_hash, &wlid, img);
                        glsym_evas_gl_common_image_free(img);
                        free(n);
index 622f832..47add69 100644 (file)
@@ -38,6 +38,9 @@ extern Evas_GL_Common_Buffer_Dump_Call glsym_evas_gl_common_buffer_dump;
 extern Evas_GL_Preload_Render_Call glsym_evas_gl_preload_render_lock;
 extern Evas_GL_Preload_Render_Call glsym_evas_gl_preload_render_unlock;
 
+/* define this to enable debug for the gl_drm engine */
+/* #define GL_DRM_DBG 0 */
+
 # ifdef ERR
 #  undef ERR
 # endif