Commit graph

20 commits

Author SHA1 Message Date
Emmanuele Bassi
77c2820840 Drop "slim" symbols
The original "slim" symbol rewriting was added without any shred of a
set of performance evaluation, and mostly copy-pasted from a very early
version of pixman. Pixman itself never used them, and most C
libraries—like GLib and GTK—have dropped similar mechanisms over the
past 15 years, as linkers have improved considerably in the meantime.

Modern linkers provide functionality to avoid intra-library PLT jump
through flags like `-Bsymbolic-functions`; we should use that, instead,
and keep the code base more maintainable and debuggable.
2023-08-16 16:33:04 +01:00
Adrian Johnson
9ffbf63d37 fix warning: inlining failed in call to '_csi_stack_push' 2017-10-21 13:08:39 +10:30
Bryce Harrington
714a77e3f1 cairo-script: Prefer cairo from local tree
Use quoted includes rather than bracketed, to prefer linking to the
in-tree cairo in preference to the system cairo.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-18 12:38:55 -07:00
Bryce Harrington
a3b6afabf6 cairo-script: Always include config.h first thing
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2015-06-18 12:38:43 -07:00
Bryce Harrington
39b7d5138e cairo-script: Compare status with CSI enums
CSI_STATUS_SUCCESS is defined as equivalent to CAIRO_STATUS_SUCCESS.
We should prefer the former when comparing against csi_status_t
variables, else we'll get a warning:

cairo-script-interpreter.c:637:23: warning: comparison between
‘csi_status_t’ and ‘enum _cairo_status’ [-Wenum-compare]

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-31 11:26:02 -08:00
Chris Wilson
af9fbd176b Introduce a new compositor architecture
Having spent the last dev cycle looking at how we could specialize the
compositors for various backends, we once again look for the
commonalities in order to reduce the duplication. In part this is
motivated by the idea that spans is a good interface for both the
existent GL backend and pixman, and so they deserve a dedicated
compositor. xcb/xlib target an identical rendering system and so they
should be using the same compositor, and it should be possible to run
that same compositor locally against pixman to generate reference tests.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

P.S. This brings massive upheaval (read breakage) I've tried delaying in
order to fix as many things as possible but now this one patch does far,
far, far too much. Apologies in advance for breaking your favourite
backend, but trust me in that the end result will be much better. :)
2011-09-12 08:29:48 +01:00
Andrea Canciani
b8a7f8621a Update FSF address
I updated the Free Software Foundation address using the following script.

for i in $(git grep Temple | cut -d: -f1 )
do
  sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
2010-04-27 11:13:38 +02:00
Chris Wilson
fee647c985 [script] Read from a FILE stream
For ease of implementing the interpreter inside a pipeline, add a method
to execute a FILE *.
2009-08-29 08:08:37 +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
34ac8673b2 [script] Use setjmp exception handling during scanning
Save ~5% of overhead by using longjmp on error to terminate scanning
instead of propagating the error, incurring lots of redundant error
checks.
2009-06-28 00:48:05 +01:00
Chris Wilson
55721d380d [script] Report line number
Count the number of newlines processed in the trace and provide an API for
the user to query.
2009-06-19 14:13:34 +01:00
Chris Wilson
867c88ae90 [script] Add a finish method to the interpreter
When using fonts circular references are established between the holdover
font caches and the interpreter which need manual intervention via
cairo_script_interpreter_finish() to break.
2009-06-06 12:59:39 +01: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
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
177a68ef3e [script] Add a few mathematical constants
Just pi and the sqrt(2) for the moment, more to come on demand.
2008-12-12 12:00:42 +00:00
M Joonas Pihlaja
620028fd19 [script] Don't segfault when hashing empty strings.
Check for the empty string.
2008-12-12 12:00:41 +00:00
Chris Wilson
c41b99268d Conditionally include byteswap.h
Fixup compilation by copying the checks from cairo-wideint-private.h to
conditionally include byteswap.h and provide fallback implementations.
2008-11-19 11:59:21 +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