Commit graph

425 commits

Author SHA1 Message Date
Chris Wilson
098822d7ee [script] Fix erroneous error return when rendering type3 glyphs
Only return a USER_FONT_ERROR if an error occurs whilst rendering the
glyph!
2009-06-06 10:35:19 +01:00
Chris Wilson
fa5d6c7afd [trace] Add a --profile mode
To save typing when creating macro-benchmarks --profile disables
mark-dirty and caller-info and compresses the trace using LZMA. Not for
computers short on memory!
2009-06-03 19:29:19 +01:00
Chris Wilson
56e9765f82 [util] Add font-view
A C variant of Behdad's python example font viewer.
2009-06-02 18:16:48 +01:00
Chris Wilson
99482b17a5 [script] Improve caching of glyph advance
The glyph advance cache was only enabled for glyph indices < 256,
causing a large number of misses for non-ASCII text. Improve this by
simply applying the modulus of the index to select the cache slot - which
may cause some glyph advances to be overwritten and re-queried, but
improves the hit rate.
2009-06-02 15:13:46 +01:00
Eric Anholt
f59f44c140 Merge commit 'origin/master' into gl
Felt like pulling the latest stuff, since I branched back in February.

Conflicts:
	build/configure.ac.features
	src/cairo.h
	util/cairo-script/csi-replay.c
2009-06-02 00:56:39 -07:00
Chris Wilson
247e76b923 [script] Speed up floating-point scanner
Hard-code frequent exponents to reduce number of calls to pow().
2009-06-01 18:04:13 +01:00
Chris Wilson
7dbc2fe80a [script] Simplify _dictionary_name_equal
Just a simple return TRUE since all necessary checking is performed by
_csi_hash_table_lookup().
2009-05-25 22:14:57 +01:00
Chris Wilson
0b5e92e66b [script] Check hash value between comparing keys 2009-05-25 22:14:57 +01:00
Chris Wilson
a364f71194 [trace] Set output location using pwd
Record the current working directory and pass that along to cairo-trace so
that the trace output is local to the user and not the application. This
is vital if the application is called via a script that changes directory.
2009-05-25 22:14:56 +01:00
Chris Wilson
a76e09ea65 [trace] Missing newlines in error messages. 2009-05-25 22:14:56 +01:00
Chris Wilson
87b764908a [gl] Add EGL target
Split the GLX context from the GL surface to enable use of an alternative
EGL interface.
2009-05-20 08:13:45 +01:00
Chris Wilson
e38f85c5de [script] Pedantic violations
Fixup a few trivial errors with -pedantic.
2009-05-08 08:53:43 +01:00
Chris Wilson
0c00556990 [script] Missing include for INT32_MAX
Avoid depending upon stdint.h, or rather cut'n'pasting Cairo's portable
defines, by using INT_MAX and limits.h instead.
2009-05-08 08:52:32 +01:00
Chris Wilson
9099c7e730 [trace] Disable mark dirty tracing.
Applications like firefox have a very conservative approach and mark
surfaces dirty before every render. As we record the image data every
time, firefox traces can grow very large with redundant data - so allow
the user to disable mark dirty tracing.
2009-03-04 09:26:17 +00:00
Chris Wilson
2df611a381 [script] Expose a normal xlib window for replay
Provide a visible surface for replaying scripts against.
2009-02-12 18:27:51 +00:00
Behdad Esfahbod
d63c1ab3ff [util/malloc-stats] Do a single backtrace_symbols() call
I was hoping that this may speed things up, but it didn't.  :(
2009-01-31 22:10:57 -05:00
Behdad Esfahbod
64d1c75870 [util] Fix memset bug in malloc-stats 2009-01-31 21:34:46 -05:00
Behdad Esfahbod
b02aeb367d [util] Don't link backtrace-symbols into malloc-stats
On my rawhide machine, seems like the glibc backgrace-symbols is now as
good as our private backtrace-symbols.
2009-01-31 21:33:42 -05:00
Chris Wilson
dd11d905a5 [util] Use a hash-table for malloc-stats.
At Behdad's request, convert the array of allocators into a simple hash
table (large static number of buckets + chaining) in order to speed up
malloc profiling.
2009-01-30 10:18:15 +00:00
Chris Wilson
6b5d2bf1a7 [trace] Comment out the redundant wrapping of FT_Open_Face()
Remove the left-over debugging spew, but leave a comment to hopefully
clarify the situation with wrapping FT_Open_Face().
2009-01-29 10:10:40 +00:00
Carl Worth
faa004033c cairo-trace: Print name of trace file.
It's just a lot easier to use cairo-trace if it tells you
what file it just created.
2009-01-29 10:10:40 +00:00
Chris Wilson
a023104400 [trace] Adopt _cairo_dtostr
In order to have locale-independent output of decimal values, we need to
manually transform such numbers into strings. As this is a solved problem
for cairo, we adopt _cairo_output_stream_printf() and in particular the
_cairo_dtostr() routine for our own printf processing.
2009-01-02 10:36:52 +00:00
Chris Wilson
8abd21bd3a [script] Call the context creation hook
Hook in the creation hook so applications can record or even modify the
contexts used in replay.
2009-01-02 09:53:25 +00:00
Chris Wilson
2c9323d394 [script] more targets 2009-01-02 09:53:25 +00:00
Chris Wilson
fd96cea4fe [script] Improve array construction.
Limit the memory allocation to the initial array size and perform a direct
copy from the operand stack to the array.
2009-01-02 09:53:24 +00:00
Chris Wilson
ecb8dce27c [script] Recreate surface content.
Use the content recorded in the trace, defaulting to COLOR_ALPHA, to
determine the replayed surface type.
2009-01-02 09:53:24 +00:00
Chris Wilson
d21529b9ef [trace] Correct escaped characters in string literal.
Laziness caused the control character to be used instead of its
replacement in the escaped string!
2009-01-02 09:53:24 +00:00
Chris Wilson
ca39c4bf7f [trace] Correct a couple of typos.
A couple of minor typos in the escaped characters strings.
2009-01-02 09:53:24 +00:00
Chris Wilson
1f2fec7388 [trace] Fix OBO in emit_glyphs()
The largest index that will fit within 8 bits is 255 not 256!
2009-01-02 09:53:23 +00:00
Chris Wilson
7ebe9e6837 [trace] Minor tidy.
Improve scoping of variables.
2009-01-02 09:53:22 +00:00
Chris Wilson
931556005a [trace] Remove the forced switching to C locale
This interferes with the application being traced. It is not clear from
printf(3) whether "%.f" is locale dependent or not - but until we have a
failure do not break applications unnecessarily!
2009-01-02 09:53:22 +00:00
Chris Wilson
d0f41b92bf [trace] Do not force the output filename.
Handle the case of tracing an application that spawns it own graphical
children but using the autonaming facility within cairo-trace. Currently
the traced process tree would all attempt to write to the same file,
creating a broken trace. This means sacrificing the display of the output
name, but allows use for a wider range of applications.
2009-01-02 09:53:21 +00:00
Behdad Esfahbod
14d94d9354 Fix various README typos 2009-01-02 02:56:38 -05:00
Chris Wilson
4320ea6887 [trace] Fix up positional arguments
James Cloos pointed out that the correct form to use is "$@" when
executing the command line.
2008-12-27 11:34:31 +00:00
Behdad Esfahbod
9332c0a8ea [util] Add waterfall 2008-12-26 16:38:26 -05:00
Behdad Esfahbod
9f9f5317dc [util] Fix pangram 2008-12-24 22:29:59 -05:00
Behdad Esfahbod
52cc31a7fa [util] Add cairo-view 2008-12-23 13:48:52 -05:00
Chris Wilson
449bf0bb7b [script] Silence incorrect compiler warnings
Bah, the compiler failed to do its IPA correctly and wrongly complained
about potential use of uninitialised out-params guarded by the return
value. Silence them!
2008-12-18 12:06:46 +00:00
Chris Wilson
0df43251d4 [replay] Take advantage of unresolved fonts
As Behdad has changed the underlying ft-font to accept unresolved patterns,
take advantage of that to simplify the replay code.
2008-12-18 12:06:35 +00:00
Chris Wilson
aa65e756d4 [script] Avoid creating 0x0 windows
XCreateWindow dies if asked to create a 0x0 window, so don't and use a 1x1
pixel window for a zero-sized surface.
2008-12-18 10:40:14 +00:00
Chris Wilson
9b46d13b6c [trace] Runtime version check.
Check that the application is using cairo >= 1.9 before attempting to
query the mime-data.
2008-12-18 10:40:13 +00:00
Chris Wilson
6f284587a4 [script] Add examples
Add some simple examples to demonstrate CairoScript, courtesy of M Joonas
Philaja.
2008-12-12 12:00:44 +00:00
Chris Wilson
463dc28913 [script] Allocate the interned strings from a permanent pool
Reduce memory fragmentation by allocating the permanent strings from a
single pool.
2008-12-12 12:00:44 +00:00
Chris Wilson
adc9c90d79 [script] Freed object cache.
Cache the last freed object to reduce malloc pressure.
2008-12-12 12:00:44 +00:00
Chris Wilson
1042909796 [script] Replay multiple files.
Iterate over the argument vector and replay each file on the command line.
2008-12-12 12:00:44 +00:00
Chris Wilson
c5c04528b5 [script] Slab allocator
Allocate small objects from a pool and maintain a per-size free-list.
2008-12-12 12:00:44 +00:00
Chris Wilson
83f0e6cf62 [script] Inline the stack push
Frequently to push an object onto the stack all we need is to simply
perform the struct copy - so inline it and only call the out-of-line
function if we need to enlarge the stack.
2008-12-12 12:00:43 +00:00
Chris Wilson
565b3d6ad6 [script] Switch to hyphens.
Using hyphen in the operators is easier to read than underscores.
2008-12-12 12:00:43 +00:00
Chris Wilson
3abfd836a0 [script] Null constructor
Expose 'null', principally for comparison purposes.
2008-12-12 12:00:43 +00:00
M Joonas Pihlaja
7540ac7f23 [script] Reverse direction of bitshift.
Positive shift counts should shift left according to PostScript.
2008-12-12 12:00:43 +00:00