diff options
-rw-r--r-- | src/cairo-ps-surface.c | 4 | ||||
-rw-r--r-- | test/mime-unique-id.c | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c index 1d2bba20e..5421c39c9 100644 --- a/src/cairo-ps-surface.c +++ b/src/cairo-ps-surface.c @@ -3507,13 +3507,13 @@ _cairo_ps_surface_use_form (cairo_ps_surface_t *surface, if (surface->ps_level == CAIRO_PS_LEVEL_3) max_size = MAX_L3_FORM_DATA; else - max_size = MAX_L3_FORM_DATA; + max_size = MAX_L2_FORM_DATA; /* Don't add any more Forms if we exceed the form memory limit */ if (surface->total_form_size + params->approx_size > max_size) return CAIRO_INT_STATUS_UNSUPPORTED; - surface->total_form_size += params->approx_size > max_size; + surface->total_form_size += params->approx_size; unique_id = _cairo_malloc (source_key.unique_id_length); if (unique_id == NULL) return _cairo_error (CAIRO_STATUS_NO_MEMORY); diff --git a/test/mime-unique-id.c b/test/mime-unique-id.c index aab93164d..8d4a16133 100644 --- a/test/mime-unique-id.c +++ b/test/mime-unique-id.c @@ -79,10 +79,13 @@ * * If the size check fails, manually check the output and if the * surfaces are still embedded only once, update the expected sizes. + * + * Note: The PS2 output will embed the image more than once due to the + * lower MAX_L2_FORM_DATA for PS2 in cairo-ps-surface.c. */ -#define PS2_EXPECTED_SIZE 417510 -#define PS3_EXPECTED_SIZE 381554 -#define PDF_EXPECTED_SIZE 162923 +#define PS2_EXPECTED_SIZE 626926 +#define PS3_EXPECTED_SIZE 381555 +#define PDF_EXPECTED_SIZE 162692 #define SIZE_TOLERANCE 5000 static const char *png_filename = "romedalen.png"; |