Commit graph

10 commits

Author SHA1 Message Date
Chris Wilson
d828c724c0 gl: Decouple the glyph upon eviction
In order to decouple the texture node from the scaled glyph cache, we
need to add a callback from the rtree for when the node is removed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-07 18:00:18 +00:00
Chris Wilson
0ce8dad9a2 gl: Decouple glyphs on shutdown from the scaled font caches
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-05 17:17:26 +00:00
Chris Wilson
c8fba49603 rtree: Remove the unused evict hook. 2010-05-12 20:54:49 +01:00
Chris Wilson
2a07263373 rtree: defer propagating pinned nodes until eviction.
Only during infrequent eviction do we require absolute knowledge of
which graph of nodes are in use and thus pinned. So during the common
use of querying the glyph cache, we just mark the leaf as used. Then we
need to make space for a new glyph, we move the parents of the left
nodes from the evictable list to the pinned list.
2010-05-12 20:54:49 +01:00
Andrea Canciani
b8a7f8621a Update FSF address
I updated the Free Software Foundation address using the following script.

for i in $(git grep Temple | cut -d: -f1 )
do
  sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
2010-04-27 11:13:38 +02:00
Chris Wilson
03f7bfc351 rtree: Remove the false assert upon collapse. 2010-04-14 20:14:39 +01:00
Chris Wilson
c50c8b90c0 Move _cairo_error() to a standalone header
A pending commit will want to include some utility code from cairo and
so we need to extricate the error handling from the PLT symbol hiding.
2010-01-22 22:30:43 +00:00
Chris Wilson
e19b2866ed [gl] Actually remove the glyph from the rtree on scaled_font_fini
Mark the node as available when the scaled_glyph is finished, and then
attempt to collapse the parent node.
2009-07-27 13:16:30 -07:00
Chris Wilson
2da01ed552 [rtree] Merge the common unpin_and_evict_unused() routine
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-27 18:23:11 +01:00
Chris Wilson
efb3445ee1 Add a simple rectangle tree (rtree) implementation
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.
2009-07-27 10:18:26 +01:00