From 2747aa7be235de77b33433821f1756b9c923a2ae Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 2 Feb 2009 12:04:34 +0000 Subject: [PATCH] [text] Use create_pango_layout() Since we added clutter_actor_get_pango_layout() it would be a good idea to use it in the ClutterText actor to cut down the PangoContext-related calls. --- clutter/clutter-text.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c index 4ba84e0a6..37784ed8c 100644 --- a/clutter/clutter-text.c +++ b/clutter/clutter-text.c @@ -234,12 +234,9 @@ clutter_text_create_layout_no_cache (ClutterText *text, ClutterUnit allocation_width) { ClutterTextPrivate *priv = text->priv; - PangoContext *context; PangoLayout *layout; - context = clutter_actor_get_pango_context (CLUTTER_ACTOR (text)); - layout = pango_layout_new (context); - + layout = clutter_actor_create_pango_layout (CLUTTER_ACTOR (text), NULL); pango_layout_set_font_description (layout, priv->font_desc); if (priv->text)