diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2007-01-16 20:44:05 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2007-01-16 20:44:05 +0000 |
commit | e1181d9a4c6f49586dfb96a837cde2846cbbb06e (patch) | |
tree | 367017a182ec4ff080222623dc34d70ede98d400 /pango | |
parent | 5d65122f8a714e04b05c52947cedaab090345d37 (diff) | |
download | pango-e1181d9a4c6f49586dfb96a837cde2846cbbb06e.tar.gz |
Bug 397337 – Use is_ellipsized and is_wrapped to optimize property
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.
svn path=/trunk/; revision=2168
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-layout.c | 7 |
1 files changed, 5 insertions, 2 deletions
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); } } |