cogl: Use GHookList instead of CoglCallbackList

glib already has a data type to manage a list of callbacks called a
GHookList so we might as well use it instead of maintaining Cogl's own
type. The glib version may be slightly more efficient because it
avoids using a GList and instead encodes the prev and next pointers
directly in the GHook structure. It also has more features than
CoglCallbackList.
This commit is contained in:
Neil Roberts
2011-03-14 17:58:31 +00:00
parent 034d273030
commit f38b7a78fb
8 changed files with 65 additions and 208 deletions

View File

@@ -212,7 +212,7 @@ cogl_pango_render_qdata_forget_display_list (CoglPangoRendererQdata *qdata)
{
_cogl_pango_glyph_cache_remove_reorganize_callback
(qdata->renderer->glyph_cache,
(CoglCallbackListFunc) cogl_pango_render_qdata_forget_display_list,
(GHookFunc) cogl_pango_render_qdata_forget_display_list,
qdata);
_cogl_pango_display_list_free (qdata->display_list);
@@ -289,7 +289,7 @@ cogl_pango_render_layout_subpixel (PangoLayout *layout,
we can rebuild the display list */
_cogl_pango_glyph_cache_add_reorganize_callback
(priv->glyph_cache,
(CoglCallbackListFunc) cogl_pango_render_qdata_forget_display_list,
(GHookFunc) cogl_pango_render_qdata_forget_display_list,
qdata);
priv->display_list = qdata->display_list;