summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Dreßler <verdre@v0yd.nl>2020-02-12 12:36:20 +0100
committerJonas Dreßler <verdre@v0yd.nl>2020-11-22 14:57:05 +0100
commit3843293e40ac05df19861161e4da65deb1517892 (patch)
tree6e40140bcbf38ad40fa0529b233f7950b65fb5d9
parentaedbe037e49a027367ae4a60a518f60c79fcf279 (diff)
downloadmutter-3843293e40ac05df19861161e4da65deb1517892.tar.gz
clutter/text: Use new pango API to compare attribute lists
Use the new API provided by Pango to compare two PangoAttrLists, this means we can also detect equal lists that were newly created and avoid the expensive relayout of the ClutterText a lot more often. Depends on https://gitlab.gnome.org/GNOME/pango/merge_requests/172 Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1411 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1050>
-rw-r--r--clutter/clutter/clutter-text.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/clutter/clutter/clutter-text.c b/clutter/clutter/clutter-text.c
index 54bc566f3..4967b0258 100644
--- a/clutter/clutter/clutter-text.c
+++ b/clutter/clutter/clutter-text.c
@@ -6001,10 +6001,7 @@ clutter_text_set_attributes (ClutterText *self,
priv = self->priv;
- /* While we should probably test for equality, Pango doesn't
- * provide us an easy method to check for AttrList equality.
- */
- if (priv->attrs == attrs)
+ if (pango_attr_list_equal (priv->attrs, attrs))
return;
if (attrs)