summaryrefslogtreecommitdiff
path: root/src/cairo-rtree.c
AgeCommit message (Collapse)AuthorFilesLines
2009-07-27[gl] Actually remove the glyph from the rtree on scaled_font_finiChris Wilson1-0/+13
Mark the node as available when the scaled_glyph is finished, and then attempt to collapse the parent node.
2009-07-27[rtree] Merge the common unpin_and_evict_unused() routineChris Wilson1-2/+48
Having written the same method to prune glyphs from the rtree three times, I thought wise to add the common method to the core routines.
2009-07-27Add a simple rectangle tree (rtree) implementationChris Wilson1-0/+349
In order to efficient store small images, we need to pack them into a large texture. The rtree handles allocation of small rectangles out of a much larger whole. As well as tracking free rectangles, it can also be used to note which parts of the texture are 'pinned' -- that is have operations currently pending and so can not be modified until that batch of operations have been flushed. When the rtree is full, i.e. there is no single free rectangle to accommodate the allocation request, it will randomly evict an unpinned block large enough to fit the request. The block may comprise just a single glyph, or a subtree of many glyphs. This may not be the best strategy, but it is an effective start.