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.
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)