mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
[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.
This commit is contained in:
parent
6e12722a9b
commit
2747aa7be2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user