Detect changes to a PangoLayout
- From: Neil Roberts <bpeeluk yahoo co uk>
- To: gtk-i18n-list gnome org
- Subject: Detect changes to a PangoLayout
- Date: Wed, 20 May 2009 18:45:21 +0100
Hi,
In Clutter we currently use Pango to render the ClutterTexts. Every
time the ClutterText is painted we call pango_renderer_draw_layout
which creates some geometry to send to the GPU.
It would be nice if we could avoid rebuilding this geometry every
frame and keep it in a vertex buffer object instead. There is a patch
to do this here:
http://bugzilla.openedhand.com/show_bug.cgi?id=1572
This works by attaching some data to the pango layout when it is first
painted using g_object_set_qdata. It works fine for ClutterTexts because
they abandon the layout and recreate it any time it needs to make some
changes. However we also expose an interface from Cogl for directly
rendering pango layouts. In that case it might not work correctly if
the developer renders the layout, makes some changes to it and then
renders it again later because the VBO will already have been created
and attached to the layout.
So my question is: is there any to detect when the PangoLayout has
been altered so we can recreate the VBO? PangoLayout doesn't seem to
have any properties or signals that I could attach to.
Thanks for your help.
Regards,
- Neil
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]