cairo-trace: Fix duplicated surface push on similar-image

The current code results in trace lines with the source surface being
pushed on the stack two times instead of one:

s1 s1 //ARGB32 48 48 similar-image % s2

Instead of:

s1 //ARGB32 48 48 similar-image % s2

This greatly confuses later commands when the script was replayed,
causing traces for trivial GTK3 programs to be unplayable, usually
yielding the following error:
"invalid value (typically too big) for the size of the input (surface, pattern, etc.)"

Drop the duplicated entry from the trace line printed by the
cairo_surface_create_similar_image() override.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73580
Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
This commit is contained in:
Emanuele Aina 2014-12-16 14:58:55 +01:00 committed by Andrea Canciani
parent ebd23accc8
commit cca8b1960b

View file

@ -3738,8 +3738,7 @@ cairo_surface_create_similar_image (cairo_surface_t *other,
else
_trace_printf ("%d index ",
current_stack_depth - other_obj->operand - 1);
_trace_printf ("s%ld //%s %d %d similar-image %% s%ld\n",
_get_surface_id (other),
_trace_printf ("//%s %d %d similar-image %% s%ld\n",
_format_to_string (format),
width, height,
new_obj->token);