[mutter] clutter/text: Use new pango API to compare attribute lists



commit 3843293e40ac05df19861161e4da65deb1517892
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Wed Feb 12 12:36:20 2020 +0100

    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>

 clutter/clutter/clutter-text.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/clutter/clutter/clutter-text.c b/clutter/clutter/clutter-text.c
index 54bc566f31..4967b02588 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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]