[pango/matthiasc/for-master: 5/6] layout: Remove a broken optimization




commit 60bbd95b69112114d36b239b559f39fbf3259721
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Apr 4 11:49:10 2021 -0400

    layout: Remove a broken optimization
    
    pango_layout_set_width was trying to avoid invalidating
    lines in some cases, but it failed. Which is good, since
    this is incorrect, since it did not take possible
    ellipsization into account.

 pango/pango-layout.c | 5 -----
 1 file changed, 5 deletions(-)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index e847e789..57ec7606 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -356,11 +356,6 @@ pango_layout_set_width (PangoLayout *layout,
   if (width != layout->width)
     {
       layout->width = width;
-
-      /* Increasing the width can only decrease the line count */
-      if (layout->line_count == 1 && width > layout->width)
-        return;
-
       layout_changed (layout);
     }
 }


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