From 030ef4ca0023166fcb82f0a0b1512eb31beb3385 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 19 Jun 2009 11:56:14 +0100 Subject: [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. --- util/cairo-trace/trace.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'util/cairo-trace') 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); -- cgit v1.2.3