[gtk+] wayland: Don't use g_print for debug output
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Don't use g_print for debug output
- Date: Mon, 29 Feb 2016 02:45:06 +0000 (UTC)
commit 29c1263c4b5bc7d75a932a9d82cb5142413c71ae
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Feb 28 21:28:01 2016 -0500
wayland: Don't use g_print for debug output
The g_print documentation explicitly says not to do this, since
g_print is meant to be redirected by applications. Instead use
g_message for logging that can be triggered via GTK_DEBUG.
gdk/wayland/gdkglcontext-wayland.c | 29 ++++++++++++++---------------
1 files changed, 14 insertions(+), 15 deletions(-)
---
diff --git a/gdk/wayland/gdkglcontext-wayland.c b/gdk/wayland/gdkglcontext-wayland.c
index 987c717..b578d7a 100644
--- a/gdk/wayland/gdkglcontext-wayland.c
+++ b/gdk/wayland/gdkglcontext-wayland.c
@@ -181,7 +181,7 @@ gdk_wayland_gl_context_realize (GdkGLContext *context,
return FALSE;
}
- GDK_NOTE (OPENGL, g_print ("Created EGL context[%p]\n", ctx));
+ GDK_NOTE (OPENGL, g_message ("Created EGL context[%p]", ctx));
context_wayland->egl_context = ctx;
@@ -285,19 +285,18 @@ gdk_wayland_display_init_gl (GdkDisplay *display)
epoxy_has_egl_extension (dpy, "EGL_KHR_surfaceless_context");
GDK_NOTE (OPENGL,
- g_print ("EGL API version %d.%d found\n"
- " - Vendor: %s\n"
- " - Version: %s\n"
- " - Client APIs: %s\n"
- " - Extensions:\n"
- "\t%s\n"
- ,
- display_wayland->egl_major_version,
- display_wayland->egl_minor_version,
- eglQueryString (dpy, EGL_VENDOR),
- eglQueryString(dpy, EGL_VERSION),
- eglQueryString(dpy, EGL_CLIENT_APIS),
- eglQueryString(dpy, EGL_EXTENSIONS)));
+ g_message ("EGL API version %d.%d found\n"
+ " - Vendor: %s\n"
+ " - Version: %s\n"
+ " - Client APIs: %s\n"
+ " - Extensions:\n"
+ "\t%s",
+ display_wayland->egl_major_version,
+ display_wayland->egl_minor_version,
+ eglQueryString (dpy, EGL_VENDOR),
+ eglQueryString (dpy, EGL_VERSION),
+ eglQueryString (dpy, EGL_CLIENT_APIS),
+ eglQueryString (dpy, EGL_EXTENSIONS)));
return TRUE;
}
@@ -434,7 +433,7 @@ gdk_x11_gl_context_dispose (GObject *gobject)
eglMakeCurrent(display_wayland->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
EGL_NO_CONTEXT);
- GDK_NOTE (OPENGL, g_print ("Destroying EGL context\n"));
+ GDK_NOTE (OPENGL, g_message ("Destroying EGL context"));
eglDestroyContext (display_wayland->egl_display,
context_wayland->egl_context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]