Commit graph

411 commits

Author SHA1 Message Date
Emmanuele Bassi
bd13841257 Drop the conditional inclusion of config.h
We *always* generate this file, and we depend on its existence.

The idea behind HAVE_CONFIG_H was being able to include random files
from different projects, back in a time where "libraries" were literally
just random files instead of actual shared objects.

Since we're not in the '80s any more, and our build system(s) define
HAVE_CONFIG_H *and* generate the config.h header file, we don't need a
conditional guard around its inclusion.
2021-05-01 17:05:29 +01:00
Emmanuele Bassi
bfd1602db9 Remove stray _GNU_SOURCE definitions
We define _GNU_SOURCE globally in both the Autotools build, through the
use of the AC_USE_SYSTEM_EXTENSIONS macro; and in the Meson build, with
add_project_arguments().
2021-05-01 16:58:15 +01:00
Tim-Philipp Müller
4ea2991a40 Retire dummy cairo-version.h header to fix meson subproject build
It was originally added to make bisecting easier,
but has outlived its usefuleness now.

Going forward we'll have just a single cairo-version.h
header file, the one with the real version numbers.

This is needed to fix the case where cairo is being
built as a Meson subproject, but also simplifies
things in general.

Fixes #421
2020-09-29 15:50:53 +00:00
luz.paz
6d93bddbd6 Misc. typos
Found via `codespell -i 3 -w -I ../cairo-word-whitelist.txt -L tim,ned,uint`
Follow up of 12cb59be7d

Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2019-01-31 17:37:15 -08:00
Maarten Lankhorst
a34cb719cd Add support for RGBA128F and RGB96F formats.
IGT wants to add support for planes with a bit depth >10, which
requires a higher precision format than we have currently.

I'm using RGBA as format, because of its existence in OpenGL.
With the new formats we can directly convert our bytes to half float,
or multiply a colro vector with a matrix to go to the Y'CbCr colorspace.

This requires pixman 0.36.0, so bump the version requirement.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2019-01-07 19:10:44 -08:00
Paul Menzel
1c9201721d Use HTTPS URLs for freedesktop.org domains
Run the command below suggested by geirha in ##sed@irc.freenode.net.

    git grep -l 'http://.*freedesktop.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}freedesktop\.org\)|https\1|g'

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
2018-10-16 10:03:07 -07:00
Unknown
12cb59be7d Cairo trivial typos
Found using `codespell -q 3 -I cairo-whitelist.txt`
whereby whitelist contained:
```
amin
iff
lod
writen
```

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2018-04-02 17:46:58 -07:00
Michael Haubenwallner
94d30d7160 perf: fix include order for AIX, bug#89354 2015-03-05 17:03:18 -08:00
Michael Haubenwallner
15c427bc77 perf/micro: fix include order for AIX, bug#89354 2015-03-05 17:02:23 -08:00
Michael Haubenwallner
e9a615a2f9 define _GETDELIM for getline() on AIX
On AIX 6.1, getdelim() and getline() are not provided by default,
causing a gcc compilation error.  With _GETDELIM defined, AIX's stdio.h
header provides definitions for these routines.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=89356
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-03-05 16:57:09 -08:00
Bryce Harrington
2c5af590dd Refactor ARRAY_LENGTH macro definitions in test code 2014-11-20 12:22:06 -08:00
Ravi Nanjundappa
f8e0ecb5af test: Selective execution of Cairo tests based on FORMAT option
Added a new command line option FORMAT which can take rgb and/or rgba
values which enables the execution of tests only for the given FORMAT
For ex:
(1). CAIRO_TESTS="zero-alpha" make test TARGETS=ps2,image FORMAT=rgba,rgb
This command runs the zero-alpha test for both ps2 and image backends
with argb32 and rgb24 content formats.
(2). CAIRO_TESTS="zero-alpha" make test TARGETS=ps2,image FORMAT=rgba
This command runs the zero-alpha test for both ps2 and image backends
with argb32 content format and so on.

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-14 16:09:20 -07:00
Ravi Nanjundappa
0e0004a971 perf: Refactor some macros to cairo-perf.h
This commit covers one of the left out modifications from
"commit cd11a4ff0421fd293279b202be800550890574bb" by Bryce.
It removes the duplicate macro definition in cairo-perf-diff-files.c
which by default includes the cairo-perf.h having MAX macro defnition.

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
2014-04-22 09:51:45 -07:00
Bryce Harrington
cd11a4ff04 perf: Refactor some common macros to cairo-perf.h
These macros are standard in src's cairoint.h and test's cairo-test.h
internal header files, so for consistency do the same thing with perf's
cairo-perf.h.

Reviewed-by: Uli Schlachter <psychon@znc.in>
2014-04-18 10:09:10 -07:00
Bryce Harrington
a346e40ed3 perf: Guarantee path width is non-negative
This quells the following warning:

  perf/micro/hatching.c:39:5: warning: cannot optimize loop, the
  loop counter may overflow

Width and height aren't going to be negative so enforce it so that the
compiler can do whatever optimization it wants to do.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-25 12:13:10 -08:00
Bryce W. Harrington
e438071e9d perf: Move macro-benchmark documentation to cairo-traces
The macro benchmarks were moved to a separate repository some time ago,
but the perf README still refers to these tests as if they were still
present, which may lead to some confusion.  Instead, consolodate the
macro benchmark documentation with the macro benchmarks, and focus this
README on just the (still in tree) micro-benchmarks.

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-08-11 16:37:02 +02:00
Chris Wilson
686ebd4a89 cairo-perf-print: Do not free the uninitialised histogram
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-21 16:59:25 +01:00
Chris Wilson
c51b850bd8 perf: Remove a debug artifact
Remove the intentional #error for non-UNIX path used to remind me to fix
up configure.ac.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-11 14:11:45 +01:00
Chris Wilson
2c097e6e6b perf: Avoid vertically stretching the histogram
If we have more rows than the max_count in any column, we end up
stretching the histogram vertically, which makes it harder to read.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-11 11:57:04 +01:00
Chris Wilson
b9f0ef4496 perf: Rescale the histogram for the terminal
If running ./cairo-perf-print in a terminal, query the terminal size and
rescale the histogram to use the maximum available space.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-11 11:47:24 +01:00
Chris Wilson
9a12c2e023 perf: Rudimentary histogram printing for cairo-perf-print
If you call ./cairo-perf-print --histogram results.txt, it will then
print a histogram of the results, one per test. Ideally, you should see
a skewed distribution (with a negative skew representing that most results
run in optimal time), but random sampling errors (scheduling,
throttling, general inefficiency etc) will push it more towards a normal
distribution.

For example,
|                                                             x                |
|                                                             x xx             |
|                                                             x xx             |
|                                                             x xx             |
|                                                             xxxx             |
|                                                             xxxx x           |
|                                                          x  xxxxxx           |
|                                                          x  xxxxxx           |
|                                                          xxxxxxxxx           |
|                                                          xxxxxxxxx           |
|                                                          xxxxxxxxx           |
|                                                         xxxxxxxxxxxx         |
|                                                         xxxxxxxxxxxx         |
|                                                         xxxxxxxxxxxx         |
|                                                        xxxxxxxxxxxxxx        |
|x                                                       xxxxxxxxxxxxxx        |
|x x                                                     xxxxxxxxxxxxxxx       |
|x x                                                     xxxxxxxxxxxxxxx       |
|x x                                                    xxxxxxxxxxxxxxxxx      |
|xxx                                                 x xxxxxxxxxxxxxxxxxxx     |
|xxx                                                xxxxxxxxxxxxxxxxxxxxxxxxx  |
|xxxxxx xxxx x x x   x xxx xx xxxxx xxx x xxx x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
.------------------------------------------------------------------------------.
 xlib           firefox-fishtank  8298.44 1.53% (829/946)

Starts off reasonably, but quickly deteriorates as the integrated CPU/GPU
overheats and is forced to throttle.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-11 11:30:43 +01:00
Chris Wilson
0446fae26d perf: Iteratively prune outliers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-02 08:39:05 +01:00
Matthew Fischer
0e999edff8 Adding a simple usage statement to cairo-perf-chart
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-18 13:59:37 +01:00
Chris Wilson
ec58fde294 perf: Synchronize before stopping the timers
Fixes a regression from

commit 2855ff4666
Author: Andrea Canciani <ranma42@gmail.com>
Date:   Wed Aug 31 16:42:03 2011 +0200

    perf: Reuse cairo-time

which dropped the essential call to synchronize when refactoring the
code.

Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31 14:06:48 +00:00
Chris Wilson
3c18bae20e perf; Do not allow the backends to optimize away the clear before sync
The importance of writing to the scratch surface before retrieving an
image is that it makes that the write lands in the server queue, as well
as the GetImage, in order to serialise the timer against all the
operations.

Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-28 10:06:47 +00:00
Chris Wilson
146da77d85 script: Attempt to decompress images in place
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08 15:01:37 +00:00
Chris Wilson
9558cb62c6 perf/chart: Contract the default output filenames
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-29 18:51:54 +00:00
Chris Wilson
fbd4864995 perf/chart: Show the geometric average as an extra column
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-29 18:30:48 +00:00
Chris Wilson
70c2125e2c perf/chart: Render a solid bar if the column is too narrow for the gradient
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-12 18:14:59 +01:00
Nis Martensen
77da76ac6c doc: fix a few typos found by codespell
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:28 +01:00
Andrea Canciani
58f79a85b0 perf: Don't use a boolean value as integer
Although in this case the boolean values are guaranteed to be 1/0,
using them as true/false (in an if condition) seems much saner than
using them to limit the number of iterations on a for loop.

Fixes:

cairo-perf-micro.c:221:5: warning: cannot optimize possibly infinite
loops [-Wunsafe-loop-optimizations]
2012-02-20 12:32:54 +01:00
Chris Wilson
42ad7a2385 perf/chart: Make the columns transculent so that the label behind is visible
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-11 12:43:43 +00:00
Chris Wilson
23ca558a05 perf/chart: Show values next to the column if too small to fit inside
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-11 12:43:43 +00:00
Chris Wilson
56a835eb9d perf/chart: Tweak labels on right not to fall off the edge
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-11 12:43:43 +00:00
Chris Wilson
9ecc3aafca perf: Compile fix, add the index to cairo_perf_report_load()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-18 10:04:12 +00:00
Andrea Canciani
c65d4e35dc Use xstrdup instead of xmalloc when possible
Don't open code xstrdup, just use it.
2011-11-12 20:49:08 +01:00
Andrea Canciani
549b1f8d4b boilerplate: Remove unused thread id parameter
The thread id is not used anymore (it is always == 0), so it can be
removed.
2011-11-12 20:49:08 +01:00
Andrea Canciani
c8b5d270f6 Improve the documentation of the flags
Some utilities were providing incorrect or incomplete usage
information.
2011-11-12 20:49:08 +01:00
Andrea Canciani
6a0ba30303 Sort option flags
Keep the option flags in alphabetical order. This makes it easier to
check for collisions or missing handlers.

Avoids an internal error when passing flags -c, -r or -v to
cairo-analyse-trace.
2011-11-12 20:49:08 +01:00
Andrea Canciani
f96e78fa54 Silence some 'unused var' warnings 2011-11-09 13:56:50 +01:00
Chris Wilson
2cb4eb53fe perf 2011-10-11 09:05:44 +01:00
Chris Wilson
ffbf6158be perf: Add an a1-pixel variant
Just to measure the overhead and differences when switching between
antialiasing paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15 10:13:40 +01:00
Chris Wilson
db41096b38 perf/micro: Add the PS tiger as a measure for the antialias hints
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 19:22:24 +01:00
Chris Wilson
05a73434fc perf/stats: Avoid overflow when summing time-squared
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 12:30:58 +01:00
Chris Wilson
a6a48e0559 test: Update ref images
First pass after the recent turmoil in clip and antialias handling.
2011-09-12 15:44:47 +01:00
Chris Wilson
0f26f75eda perf/micro: Add measurement of setting the pixel directly using pixman
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-12 15:44:46 +01: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
Chris Wilson
d8ac76bcec perf/Makefile.am: Add missing '\' line continuation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-09 19:43:48 +01:00
Andrea Canciani
761ef7ae8b cairo-missing: Fix and cleanup ssize_t type definition
The definition of ssize_t is needed in cairo-missing.h and can be
dropped from files which include it.
2011-09-04 16:23:37 -07:00
Andrea Canciani
1bcc27985f perf: Fix win32 build
Microsoft C Compiler complains about:

hash-table.c(44) : error C2466: cannot allocate an array of constant
size 0

Adding an unused element makes it happy.
2011-09-02 12:52:47 +02:00