Commit graph

113 commits

Author SHA1 Message Date
Chris Wilson
d1b8186fd7 [trace] Correct emission of set_font_face and set_source
set_font_face was not consuming it's operand but blithely placing an
undefined font_face onto the operand stack, whereas set_source was
performing invalid exchanges on the stack.
2008-11-05 08:36:09 +00:00
Chris Wilson
4a4b10271a [trace] Capture foreign drawables.
If we attempt to use a surface as a source before we write to it, record
the surface contents.
2008-11-05 08:36:02 +00:00
Chris Wilson
432fe1ec27 [trace] Mark filter mode as immediate.
Be consistent and use "//" for the filter mode to indicate a constant.
2008-11-05 08:36:01 +00:00
Chris Wilson
068d465bb3 [trace] Fix emission of cairo_scaled_font_create()
In the case where the font face was no longer on the operand stack, the
font face would not have been passed to cairo_scaled_font_create().
2008-11-04 14:57:21 +00:00
Chris Wilson
a3d56c60e8 [trace] Use a common directory by default.
If called directly (e.g. via /etc/ld.so.preload) put the output trace into
a central directory, and not the pwd.
2008-11-04 14:22:08 +00:00
Chris Wilson
5ba95b7e12 [trace] Convert [1 0 0 1 0 0] to identity
Simplify the trace/replay by replacing the identity array with the
identity operator.
2008-11-04 10:43:02 +00:00
Chris Wilson
34586860ef [trace] Big-endian compile fixes.
A few typos.
2008-11-03 12:11:14 +00:00
Chris Wilson
ca83df55a6 [trace] Wrap test surfaces.
Wrap the test surfaces to avoid crashes whilst tracing the test suite.
2008-11-03 11:46:31 +00:00
Chris Wilson
8fc3d0ffeb [mime-data] Allow embedding of arbitrary mime-types.
Use the surface user-data array allow to store an arbitrary set of
alternate image representations keyed by an interned string (which
ensures that it has a unique key in the user-visible namespace).

Update the API to mirror that of cairo_surface_set_user_data() [i.e.
return a status indicator] and switch internal users of the mime-data to
the public functions.
2008-11-03 11:24:12 +00:00
Chris Wilson
04e3bb932e [trace] Emit set_mime_data().
Wrap the new cairo_surface_set_mime_data() function.
2008-11-03 11:24:07 +00:00
Chris Wilson
350fa7b98e [trace] Fix boundary terminations
Don't increment the terminator!
2008-11-03 09:36:53 +00:00
Chris Wilson
f3cbc5cf45 [trace] Use utf8 len in show_text_glyphs().
Honour the parameter specifying the length of the utf8 string when
emitting show_text_glyphs.
2008-11-03 09:36:39 +00:00
Chris Wilson
c554f18d78 [util] Add cairo-trace.
This tool can be used to trace all the cairo function calls made by an
applications.  This is useful for either extracting a test case triggering
a bug from an application, or simply to get a general idea of how an
application is using cairo.

After make install, cairo-trace program arguments, will print out all the
cairo calls to the terminal and also capture theme in ./program.$pid.trace

The format of the output is CairoScript, watch this space for more
cairo-script tools!
2008-10-31 15:37:58 +00:00