diff options
author | Lionel Landwerlin <llandwerlin@gmail.com> | 2014-06-21 21:40:54 +0100 |
---|---|---|
committer | Lionel Landwerlin <llandwerlin@gmail.com> | 2014-06-21 21:40:54 +0100 |
commit | 39b8f42f1a40856947eafbc5b217d5cad5b56ea9 (patch) | |
tree | 8385b5949dbd7bfcad29054a2a63dd08fb837e09 | |
parent | c269c0b784a902ff12e9bc7bcf299d117d06944f (diff) | |
download | clutter-gst-39b8f42f1a40856947eafbc5b217d5cad5b56ea9.tar.gz |
content: paint background color when no frame is available
-rw-r--r-- | clutter-gst/clutter-gst-content.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/clutter-gst/clutter-gst-content.c b/clutter-gst/clutter-gst-content.c index bc0ae38..7628373 100644 --- a/clutter-gst/clutter-gst-content.c +++ b/clutter-gst/clutter-gst-content.c @@ -311,11 +311,23 @@ clutter_gst_content_paint_content (ClutterContent *content, ClutterContentRepeat repeat; guint8 paint_opacity; - if (!CLUTTER_GST_CONTENT_GET_CLASS (self)->has_painting_content (self)) - return; - clutter_actor_get_content_box (actor, &box); paint_opacity = clutter_actor_get_paint_opacity (actor); + + /* No content: paint background color */ + if (!CLUTTER_GST_CONTENT_GET_CLASS (self)->has_painting_content (self)) + { + ClutterColor color; + + clutter_actor_get_background_color (actor, &color); + node = clutter_color_node_new (&color); + clutter_paint_node_set_name (node, "IdleVideo"); + clutter_paint_node_add_child (root, node); + clutter_paint_node_unref (node); + + return; + } + repeat = clutter_actor_get_content_repeat (actor); if (priv->paint_frame && priv->current_frame) |