diff options
| author | Daniel van Vugt <daniel.van.vugt@canonical.com> | 2017-08-18 10:13:37 (GMT) |
|---|---|---|
| committer | Daniel van Vugt <daniel.van.vugt@canonical.com> | 2017-08-18 10:13:37 (GMT) |
| commit | 02076c41f892e214d946457f944c6da3011307f1 (patch) | |
| tree | 06e598fa637bd3cae1a42532c58b47a64ecce0d9 | |
| parent | 7224567dca26188f3b9478f632cfb4ba0c963da4 (diff) | |
Avoid pointless clutter scene graph updateshack
For some reason bvw_update_tags gets called constantly even when nothing
is changing. And each call seems to trigger a clutter scene graph update,
which seems to occupy significant real time if not CPU time.
By avoiding pointless updates, rendering is now smoother.
| -rw-r--r-- | src/backend/bacon-video-widget.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c index a8a5dba..5808bd9 100644 --- a/src/backend/bacon-video-widget.c +++ b/src/backend/bacon-video-widget.c @@ -2063,12 +2063,15 @@ bvw_update_tags (BaconVideoWidget * bvw, GstTagList *tag_list, const gchar *type GstTagList **cache = NULL; GstTagList *result; - GST_DEBUG ("Tags: %" GST_PTR_FORMAT, tag_list); - /* all tags (replace previous tags, title/artist/etc. might change * in the middle of a stream, e.g. with radio streams) */ result = gst_tag_list_merge (bvw->priv->tagcache, tag_list, GST_TAG_MERGE_REPLACE); + if (gst_tag_list_is_equal (result, bvw->priv->tagcache)) { + gst_tag_list_unref (result); + return; + } + GST_DEBUG ("Tags: %" GST_PTR_FORMAT, tag_list); if (bvw->priv->tagcache) gst_tag_list_unref (bvw->priv->tagcache); bvw->priv->tagcache = result; |
