mirror of
https://github.com/brl/mutter.git
synced 2025-01-26 19:39:20 +00:00
canvas: avoid emission of "draw" signal when the size is zero
This also avoids the warning Cogl-WARNING **: ./cogl-buffer.c:215: GL error (1285): Out of memory generated by cogl_buffer_map when the CoglBuffer has zero length.
This commit is contained in:
parent
97dcfe5bf1
commit
2c46baf30c
@ -333,7 +333,7 @@ clutter_canvas_emit_draw (ClutterCanvas *self)
|
||||
gboolean res;
|
||||
cairo_t *cr;
|
||||
|
||||
g_assert (priv->width >= 0 && priv->width >= 0);
|
||||
g_assert (priv->width > 0 && priv->width > 0);
|
||||
|
||||
if (priv->buffer == NULL)
|
||||
{
|
||||
@ -411,7 +411,7 @@ clutter_canvas_invalidate (ClutterContent *content)
|
||||
priv->buffer = NULL;
|
||||
}
|
||||
|
||||
if (priv->width < 0 || priv->height < 0)
|
||||
if (priv->width <= 0 || priv->height <= 0)
|
||||
return;
|
||||
|
||||
clutter_canvas_emit_draw (self);
|
||||
|
Loading…
x
Reference in New Issue
Block a user