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
@ -402,6 +402,15 @@ clutter_canvas_emit_draw (ClutterCanvas *self)
|
|||||||
cr, priv->width, priv->height,
|
cr, priv->width, priv->height,
|
||||||
&res);
|
&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;
|
self->priv->cr = NULL;
|
||||||
cairo_destroy (cr);
|
cairo_destroy (cr);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user