1
0
Fork 0

text: Prevent a relayout if font descriptions or attrs are equal

https://bugzilla.gnome.org/show_bug.cgi?id=689399
This commit is contained in:
Jasper St. Pierre 2012-11-30 20:21:23 -05:00
parent c5321da66c
commit 80eeac71f9

View file

@ -571,7 +571,8 @@ clutter_text_set_font_description_internal (ClutterText *self,
{
ClutterTextPrivate *priv = self->priv;
if (priv->font_desc == desc)
if (priv->font_desc == desc ||
pango_font_description_equal (priv->font_desc, desc))
return;
if (priv->font_desc != NULL)
@ -5423,6 +5424,12 @@ 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)
return;
if (attrs)
pango_attr_list_ref (attrs);