Commit graph

15 commits

Author SHA1 Message Date
Andrea Canciani
5291f7ccad script-interpreter: Build on win32
Restructure the Makefiles in .sources, .am and .win32 to enable
building cairo-script-interpreter on Win32.

Some minor changes are needed to compile on MSVC:
 - include stdint.h to define INT_MAX-like macros
 - redefine "inline"
 - avoid deprecated functions (snprintf, replaced by _snprintf)
 - define _USE_MATH_DEFINES so that math.h defines M_PI, M_SQRT2 and
   M_LN2
2011-06-24 14:13:09 +02:00
Chris Wilson
7447915381 [script] Conditionalise the build
Allow the interpreter to be disabled if we can not satisfy its dependencies.
2009-08-29 17:07:37 +01:00
Chris Wilson
55eddb7ef4 [script] A little utility to convert a trace into a trace
Replay the trace using the interpreter onto a script surface - useful for
checking idempotency.
2009-08-29 08:08:35 +01:00
Chris Wilson
1ae5942a3a Merge commit 'anholt/gl'
Conflicts:
	boilerplate/Makefile.sources
	boilerplate/cairo-boilerplate.c
	build/configure.ac.features
	src/cairo.h
	util/cairo-script/Makefile.am
2009-07-21 22:28:44 +01:00
Chris Wilson
23648e2fdf [script] Prototypical binary translator
Hook into the scanner to write out binary version of the tokenized
objects -- note we bind executable names (i.e. check to see if is an
operator and substitute the name with an operator -- this breaks
overloading of operators by scripts).

By converting scripts to a binary form, they are more compact and
execute faster:

  firefox-world-map.trace 526850146 bytes
              bound.trace 275187755 bytes

[ # ]  backend                         test   min(s) median(s) stddev. count
[  0]     null                        bound   34.481   34.741   0.68%    3/3
[  1]     null            firefox-world-map   89.635   89.716   0.19%    3/3
[  0]      drm                        bound   79.304   79.350   0.61%    3/3
[  1]      drm            firefox-world-map  135.380  135.475   0.58%    3/3
[  0]    image                        bound   95.819   96.258   2.85%    3/3
[  1]    image            firefox-world-map  156.889  156.935   1.36%    3/3
[  0]     xlib                        bound  539.130  550.220   1.40%    3/3
[  1]     xlib            firefox-world-map  596.244  613.487   1.74%    3/3

This trace has a lot of complex paths and the use of binary floating point
reduces the file size by about 50%, with a commensurate reduction in scan
time and significant reduction in operator lookup overhead. Note that this
test is still IO/CPU bound on my i915 with its pitifully slow flash...
2009-07-04 15:29:07 +01:00
Chris Wilson
606790a860 [script] Disable compilation of examples
Now that cairo-perf-trace exists and is a far superior replay tool, use
EXTRA_PROGRAM for the original replay tools.
2009-06-13 14:07:22 +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
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
6711b591b9 [script] Simple replay.
Basic script executer.
2008-12-12 12:00:42 +00:00
M Joonas Pihlaja
41cb91d417 [script] Use the in-tree libcairo for csi-replay.
csi-replay was missing the in-tree libcairo.la so the build was
failing while looking for new symbols from the system libcairo.
2008-11-26 23:49:12 +02:00
Chris Wilson
5591cb58fd [script] Only use zlib if available.
Conditionally link against zlib - replaying a script will fail if the
trace uses a compressed format.
2008-11-26 17:43:22 +00:00
Chris Wilson
9432c0c9b8 [script] Link the interpreter against the built library.
Ensure we correctly link against the version of cairo just built.
2008-11-26 17:35:09 +00:00
Luo Jinghua
1f44fb97f3 cairo-script: add $(top_builddir)/src to CPPPATH.
$(top_builddir)/src is needed to find cairo-features.h while
building out of tree.
2008-11-25 20:45:03 +08:00
Chris Wilson
2839a0e800 [script] Add a simple replay.
A very simple replay program for trace replay.
2008-11-19 11:59:20 +00:00
Chris Wilson
cdfffc7420 Add CairoScript interpreter
Add a CairoScript interpreter library and use it to replay the test output
for the CairoScript backend. The library is also used by the currently
standalone Sphinx debugger [git://anongit.freedesktop.org/~ickle/sphinx].
The syntax/operator semantics are not yet finalized, but are expected to
mature before the next stable release.
2008-11-13 11:36:55 +00:00