summaryrefslogtreecommitdiff
path: root/pango/pango-layout-private.h
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-12-04 23:47:27 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-12-04 23:47:27 +0000
commitaab9ad8715dbbf3a23d4fc869a6551af1f56df57 (patch)
tree6b19cc04fb3384de8afeda5a3e2ad11c7a8aed88 /pango/pango-layout-private.h
parentea0ec593e49735b1c7157c73d24ac58423adafc0 (diff)
downloadpango-aab9ad8715dbbf3a23d4fc869a6551af1f56df57.tar.gz
Bug 135683 – Cache glyphstring extents
2006-12-04 Behdad Esfahbod <behdad@gnome.org> Bug 135683 – Cache glyphstring extents * pango/pango-layout.c (pango_layout_get_lines), (pango_layout_get_line), (pango_layout_line_leaked), (pango_layout_line_get_extents), (pango_layout_line_new), (pango_layout_iter_get_run), (pango_layout_iter_get_line): Cache line extents. Line extents are cached only if the user doesn't have a pointer to the line or any of its runs. Functions that give away such pointers mark the line as "leak"ed. * pango/pango-layout.c (pango_layout_index_to_line_and_extents), (pango_layout_xy_to_index), (pango_layout_index_to_pos): Use _pango_layout_iter_get_line() which is like pango_layout_iter_get_line() but doesn't leak the line. * pango/pango-layout-private.h: Add pango_layout_iter_get_line() duplicate _pango_layout_iter_get_line_readonly() that doesn't leak the line. * pango/pango-renderer.c (pango_renderer_draw_layout): Use _pango_layout_iter_get_line_readonly().
Diffstat (limited to 'pango/pango-layout-private.h')
-rw-r--r--pango/pango-layout-private.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/pango/pango-layout-private.h b/pango/pango-layout-private.h
index fa4f7b5d..bcb5d7c6 100644
--- a/pango/pango-layout-private.h
+++ b/pango/pango-layout-private.h
@@ -67,5 +67,6 @@ G_END_DECLS
void _pango_layout_line_ellipsize (PangoLayoutLine *line,
PangoAttrList *attrs);
+PangoLayoutLine* _pango_layout_iter_get_line_readonly (PangoLayoutIter *iter);
#endif /* __PANGO_LAYOUT_PRIVATE_H__ */