diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | pango/pango-layout.c | 7 |
2 files changed, 14 insertions, 2 deletions
@@ -1,5 +1,14 @@ 2007-01-16 Behdad Esfahbod <behdad@gnome.org> + Bug 397337 – Use is_ellipsized and is_wrapped to optimize property + changes + + * pango/pango-layout.c (pango_layout_set_wrap), + (pango_layout_set_ellipsize): Using is_ellipsized and is_wrapped, + only clear lines if wrap/ellipsize change has any effect on the lines. + +2007-01-16 Behdad Esfahbod <behdad@gnome.org> + *.c, *.h: Removed spaces followed b tabs. 2007-01-16 Behdad Esfahbod <behdad@gnome.org> diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 5988e839..18b67e1e 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -388,8 +388,10 @@ pango_layout_set_wrap (PangoLayout *layout, if (layout->wrap != wrap) { - pango_layout_clear_lines (layout); layout->wrap = wrap; + + if (layout->is_wrapped) + pango_layout_clear_lines (layout); } } @@ -856,7 +858,8 @@ pango_layout_set_ellipsize (PangoLayout *layout, { layout->ellipsize = ellipsize; - pango_layout_clear_lines (layout); + if (layout->is_ellipsized || layout->is_wrapped) + pango_layout_clear_lines (layout); } } |