[gtk+] wayland: Improve the error reporting in the Cairo GL surface code path
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Improve the error reporting in the Cairo GL surface code path
- Date: Thu, 19 Apr 2012 17:16:04 +0000 (UTC)
commit 1aa2a7f8212cb7679c68e0f07544670a1103a3e2
Author: Rob Bradford <rob linux intel com>
Date: Thu Apr 19 17:25:56 2012 +0100
wayland: Improve the error reporting in the Cairo GL surface code path
gdk/wayland/gdkwindow-wayland.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index bedca4b..3448bbc 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -394,6 +394,7 @@ gdk_wayland_create_cairo_surface (GdkWaylandDisplay *display,
{
GdkWaylandCairoSurfaceData *data;
cairo_surface_t *surface;
+ cairo_status_t status;
data = g_new (GdkWaylandCairoSurfaceData, 1);
data->display = display;
@@ -418,8 +419,13 @@ gdk_wayland_create_cairo_surface (GdkWaylandDisplay *display,
cairo_surface_set_user_data (surface, &gdk_wayland_cairo_key,
data, gdk_wayland_cairo_surface_destroy);
- if (cairo_surface_status (surface) != CAIRO_STATUS_SUCCESS)
- fprintf (stderr, "create gl surface failed\n");
+ status = cairo_surface_status (surface);
+ if (status != CAIRO_STATUS_SUCCESS)
+ {
+ g_critical (G_STRLOC ": Unable to create Cairo GL surface: %s",
+ cairo_status_to_string (status));
+
+ }
if (!data->buffer)
data->buffer =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]