[pango/wip/baedert/for-master] layout: Ignore setting the attributes to the same list



commit 1bb4e61c3285f95e01f13d70354716c11c27ce39
Author: Timm Bäder <mail baedert org>
Date:   Wed Jun 10 06:39:38 2020 +0200

    layout: Ignore setting the attributes to the same list

 pango/pango-layout.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 97e24d1b..3c138327 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -694,6 +694,10 @@ pango_layout_set_attributes (PangoLayout   *layout,
       !_pango_attr_list_has_attributes (attrs))
     return;
 
+  if (layout->attrs &&
+      pango_attr_list_equal (layout->attrs, attrs))
+    return;
+
   old_attrs = layout->attrs;
 
   /* We always clear lines such that this function can be called


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