WINVER and _WIN32_WINNT macros were defined in each source files and
headers that were including <windows.h>. However, because DirectWrite
requires new Windows API, some files included <windows.h> without the
version macros. This inconsistency sometimes caused troubles.
Define the version macros in meson.build.
In !309 Taylor R Campbell found a number of instances of ctype
incorrectly passed a signed char. In many cases, where only ASCII
characters are used, the code should have been using the cairo version
of the ctype function to avoid locale issues.
I merged two MRs and broke the build:
- One MR added perf/ to the meson build
- The second MR changed lots of meson code to just dependency objects
instead of just "messing" with include directories and library objects
The result was that perf/meson.build now referred to include objects and
library objects that no longer exist.
Fix this by also using dependency objects in perf/.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds the code under perf/ to meson. The only testing I did was "it
builds for me". I do not have gtk+2 installed and so I did not even try
whether that thing builds. Besides that, I mostly tried to stay close to
the autofoo build.
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.
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().
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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]
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.