[gtk+] gsk: Warn on cairo errors during gsk_render_node_draw()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gsk: Warn on cairo errors during gsk_render_node_draw()
- Date: Fri, 23 Dec 2016 07:45:27 +0000 (UTC)
commit 087ea8e531e14d6ac3bb3a8763352ca5641b676a
Author: Benjamin Otte <otte redhat com>
Date: Fri Dec 23 05:56:17 2016 +0100
gsk: Warn on cairo errors during gsk_render_node_draw()
It's the same warning we use inside GTK for when stuff weirdly goes
wrong.
gsk/gskrendernode.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gsk/gskrendernode.c b/gsk/gskrendernode.c
index fd410f6..d6a14b3 100644
--- a/gsk/gskrendernode.c
+++ b/gsk/gskrendernode.c
@@ -253,6 +253,7 @@ gsk_render_node_draw (GskRenderNode *node,
{
g_return_if_fail (GSK_IS_RENDER_NODE (node));
g_return_if_fail (cr != NULL);
+ g_return_if_fail (cairo_status (cr) == CAIRO_STATUS_SUCCESS);
cairo_save (cr);
@@ -283,6 +284,14 @@ gsk_render_node_draw (GskRenderNode *node,
}
cairo_restore (cr);
+
+ if (cairo_status (cr))
+ {
+ g_warning ("drawing failure for render node %s '%s': %s",
+ node->node_class->type_name,
+ gsk_render_node_get_name (node),
+ cairo_status_to_string (cairo_status (cr)));
+ }
}
#define GSK_RENDER_NODE_SERIALIZATION_VERSION 0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]