mirror of
https://github.com/brl/mutter.git
synced 2025-01-11 12:12:25 +00:00
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,
|
||||
&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 New Issue
Block a user