diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-06-19 11:56:14 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-06-19 11:56:14 +0100 |
commit | 030ef4ca0023166fcb82f0a0b1512eb31beb3385 (patch) | |
tree | 2fe23ec2815cd7e19388275e5f55fbf00e6a6fdc /util/cairo-trace | |
parent | d3330d7beba0e0d2543e40a0e0e4d81ea9a78b45 (diff) |
[trace] Change the threshold at which pixel data is immediately copied
Embed the pixels for images less than 32*32 as this catches most icons
which are frequently uploaded, but is still an unlikely size for a
destination image surface.
Diffstat (limited to 'util/cairo-trace')
-rw-r--r-- | util/cairo-trace/trace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c index 6964f50f..e3ab7f1b 100644 --- a/util/cairo-trace/trace.c +++ b/util/cairo-trace/trace.c @@ -3062,8 +3062,11 @@ cairo_image_surface_create_for_data (unsigned char *data, cairo_format_t format, * Defer grabbing the pixel contents until we have to, but only for * "large" images, for small images the overhead of embedding pixels * is negligible. + * + * Choose 32x32 as that captures most icons which thanks to GdkPixbuf + * are frequently reloaded. */ - if (width * height < 128) { + if (width * height < 32*32) { _emit_image (ret, NULL); _trace_printf (" dup /s%ld exch def\n", surface_id); |