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>
This commit is contained in:
Jonas Dreßler 2020-02-12 12:36:20 +01:00
parent aedbe037e4
commit 3843293e40

View File

@ -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)