canvas: Propagate Cairo errors when diagnostic mode is enabled
It can be a useful debugging tool to report the eventual error state of the cairo_t after the ::draw signal emission ended.
This commit is contained in:
parent
b4222db71d
commit
725f4a07f3
1 changed files with 9 additions and 0 deletions
|
@ -402,6 +402,15 @@ clutter_canvas_emit_draw (ClutterCanvas *self)
|
|||
cr, priv->width, priv->height,
|
||||
&res);
|
||||
|
||||
#ifdef CLUTTER_ENABLE_DEBUG
|
||||
if (_clutter_diagnostic_enabled () && cairo_status (cr))
|
||||
{
|
||||
g_warning ("Drawing failed for <ClutterCanvas>[%p]: %s",
|
||||
self,
|
||||
cairo_status_to_string (cairo_status (cr)));
|
||||
}
|
||||
#endif
|
||||
|
||||
self->priv->cr = NULL;
|
||||
cairo_destroy (cr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue