projects
/
profile
/
ivi
/
clutter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97dcfe5
)
canvas: avoid emission of "draw" signal when the size is zero
author
Stefano Facchini
<stefano.facchini@gmail.com>
Thu, 29 Mar 2012 12:35:50 +0000
(14:35 +0200)
committer
Stefano Facchini
<stefano.facchini@gmail.com>
Thu, 29 Mar 2012 13:14:29 +0000
(15:14 +0200)
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.
clutter/clutter-canvas.c
patch
|
blob
|
history
diff --git
a/clutter/clutter-canvas.c
b/clutter/clutter-canvas.c
index
7913936
..
b77af55
100644
(file)
--- a/
clutter/clutter-canvas.c
+++ b/
clutter/clutter-canvas.c
@@
-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);