VirtioGL: Debug traces cleanup
authorFrédéric Dalleau <frederic.dalleau@linux.intel.com>
Tue, 6 Aug 2013 14:40:55 +0000 (16:40 +0200)
committerFrédéric Dalleau <frederic.dalleau@linux.intel.com>
Thu, 19 Sep 2013 17:16:09 +0000 (19:16 +0200)
Some debug trace are always enabled, instead use existing debug
variable.

Signed-off-by: Frédéric Dalleau <frederic.dalleau@linux.intel.com>
Change-Id: If68becc4197e6cef44d47f612b469eb1f94211b5

libGL/client_glx.c

index bab9d7c..aeda705 100755 (executable)
@@ -687,7 +687,8 @@ static void _update_renderer(Display *dpy, Window win) {
   }
 
 
-  //fprintf(stderr, "render: win: %08x w: %d h: %d stride: %d\n", win, state->renderer_data->w, state->renderer_data->h, state->renderer_data->image->bytes_per_line);
+  if (debug_gl)
+      fprintf(stderr, "render: win: %08x w: %d h: %d stride: %d\n", win, state->renderer_data->w, state->renderer_data->h, state->renderer_data->image->bytes_per_line);
 
 // Actually render stuff
   long args[] = { INT_TO_ARG(win), INT_TO_ARG(state->renderer_data->image->bits_per_pixel), INT_TO_ARG(state->renderer_data->image->bytes_per_line), POINTER_TO_ARG(state->renderer_data->buffer)};
@@ -1342,7 +1343,7 @@ GLAPI void APIENTRY glXDestroyPixmap( Display *dpy, GLXPixmap pixmap )
        CHECK_PROC(glXDestroyPixmap);
 
        LOCK(glXDestroyPixmap_func);
-       log_gl("glXDestroyPixmap 0x%x.\n", pixmap);
+       if (debug_gl) log_gl("glXDestroyPixmap 0x%x.\n", pixmap);
 
        long args[] = { POINTER_TO_ARG(dpy), INT_TO_ARG(pixmap) };
        do_opengl_call_no_lock(glXDestroyPixmap_func, NULL, args, NULL);