1 --- misc/pixman-0.24.4/Makefile.in 2011-11-06 22:11:25.000000000 +0100
2 +++ misc/build/pixman-0.24.4/Makefile.in 2011-12-16 09:06:45.317211035 +0100
4 top_build_prefix = @top_build_prefix@
5 top_builddir = @top_builddir@
6 top_srcdir = @top_srcdir@
7 -SUBDIRS = pixman demos test
9 pkgconfigdir = $(libdir)/pkgconfig
10 pkgconfig_DATA = pixman-1.pc
12 --- misc/pixman-0.24.4/pixman/pixman-utils.c
13 +++ misc/build/pixman-0.24.4/pixman/pixman-utils.c
20 #include "pixman-private.h"
22 --- misc/pixman-0.24.4/pixman/pixman-glyph.c 2015-06-30 05:48:31.000000000 -0400
23 +++ misc/build/pixman-0.24.4/pixman/pixman-glyph.c 2017-11-25 13:26:33.075558418 -0500
26 /* XXX: These numbers are arbitrary---we've never done any measurements.
28 +#define N_PIXELS_HIGH_WATER (4 * 1024 * 1024)
29 #define N_GLYPHS_HIGH_WATER (16384)
30 #define N_GLYPHS_LOW_WATER (8192)
31 #define HASH_SIZE (2 * N_GLYPHS_HIGH_WATER)
38 glyph_t * glyphs[HASH_SIZE];
41 if (*loc == TOMBSTONE)
42 cache->n_tombstones--;
44 + cache->n_pixels += glyph->image->bits.width * glyph->image->bits.height;
49 cache->glyphs[idx & HASH_MASK] = TOMBSTONE;
50 cache->n_tombstones++;
52 + cache->n_pixels -= glyph->image->bits.width * glyph->image->bits.height;
54 /* Eliminate tombstones if possible */
55 if (cache->glyphs[(idx + 1) & HASH_MASK] == NULL)
59 cache->n_tombstones = 0;
60 + cache->n_pixels = 0;
63 PIXMAN_EXPORT pixman_glyph_cache_t *
66 cache->n_tombstones = 0;
67 cache->freeze_count = 0;
68 + cache->n_pixels = 0;
70 pixman_list_init (&cache->mru);
73 pixman_glyph_cache_thaw (pixman_glyph_cache_t *cache)
75 if (--cache->freeze_count == 0 &&
76 - cache->n_glyphs + cache->n_tombstones > N_GLYPHS_HIGH_WATER)
77 + (cache->n_glyphs + cache->n_tombstones > N_GLYPHS_HIGH_WATER || cache->n_pixels > N_PIXELS_HIGH_WATER))
79 - if (cache->n_tombstones > N_GLYPHS_HIGH_WATER)
80 + if (cache->n_tombstones > N_GLYPHS_LOW_WATER)
82 /* More than half the entries are
83 * tombstones. Just dump the whole table.
88 - while (cache->n_glyphs > N_GLYPHS_LOW_WATER)
89 + while (cache->n_glyphs > N_GLYPHS_LOW_WATER || cache->n_pixels > N_PIXELS_HIGH_WATER)
91 glyph_t *glyph = CONTAINER_OF (glyph_t, mru_link, cache->mru.tail);