On Mon, 2010-06-28 at 18:01 +0930, James Moschou wrote:
> "one solution - which is similar to what GtkTextView does - is to use a
> PangoLayout for each paragraph of text; this means that you'll have to
> implement a new text actor."
> 
> So are you suggesting that I make one actor, that has multiple
> PangoLayouts? Isn't this just trading lots of actors for lots of
> layouts, or are PangoLayouts really efficient?

PangoLayouts are not scene graph objects; as soon as you change a
ClutterText you'll cause a re-layout of everything on the stage, and a
paint cycle of everything on the stage following the re-layout. if you
are using multiple Layout objects, instead, you can cleverly detect
whether or not a layout would be on screen, or whether or not changing a
layout effects the others. hence, you can limit the amount of work you
have to do.

> Also wouldn't this cause problems since the underlying OpenGL has a
> limit on the maximum size a texture can be, or am I mistaken?

you are assuming that the text in Clutter is being painted on a huge GL
texture; it's not. Clutter stores a glyphs cache inside a GL texture
which works like an atlas; repeating glyphs are painted from the same
sub-texture. plus, Clutter can split GL textures into multiple ones to
work around the texture size limitations.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi, Open Source Software Engineer
Intel Open Source Technology Center

_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list

Reply via email to