Skip to content

Commit

Permalink
cairo-trace: Fix duplicated surface push on similar-image
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Emanuele Aina authored and Andrea Canciani committed Jan 20, 2015
1 parent ebd23ac commit cca8b19
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions util/cairo-trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cca8b19

Please sign in to comment.