diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2017-11-09 20:52:36 +1030 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2017-11-09 22:02:05 +1030 |
commit | 71746c37d48a08d56b18d4d82185896ada215194 (patch) | |
tree | fedf44349a2e15feb23f65d61e2615c37064a610 /test/cairo-test.c | |
parent | 5ffbaf9e2f7da103da8d015b5f928e25f9433b60 (diff) |
test: use CAIRO_MIME_TYPE_UNIQUE_ID with record-text-transform
The PS output from this test is > 100MB due to the duplicated images.
Using CAIRO_MIME_TYPE_UNIQUE_ID reduces the PS output to 650k, runs
considerably faster, and now produces correct output.
Diffstat (limited to 'test/cairo-test.c')
-rw-r--r-- | test/cairo-test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/cairo-test.c b/test/cairo-test.c index 6f8cb7917..d93468bdb 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -1668,6 +1668,7 @@ cairo_test_create_surface_from_png (const cairo_test_context_t *ctx, { cairo_surface_t *image; cairo_status_t status; + char *unique_id; image = cairo_image_surface_create_from_png (filename); status = cairo_surface_status (image); @@ -1683,6 +1684,10 @@ cairo_test_create_surface_from_png (const cairo_test_context_t *ctx, free (srcdir_filename); } } + unique_id = strdup(filename); + cairo_surface_set_mime_data (image, CAIRO_MIME_TYPE_UNIQUE_ID, + (unsigned char *)unique_id, strlen(unique_id), + free, unique_id); return image; } |