| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes #508
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The FT change is because my MinGW build is using a more recent version
of FT.
Remove the disabled _cairo_win32_scaled_font_text_to_glyphs() code to
fix the defined but not used warning.
_cairo_win32_scaled_font_text_to_glyphs() was diabled in d9408041aa with
the comment:
"Currently disable the win32-font text_to_glyphs(), until that one
is updated. Or better yet, remove it and implement
ucs4_to_index(). It's the toy font API afterall."
_cairo_win32_scaled_font_ucs4_to_index() was added in d1c619bc7d.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
| |
Fix some enum mixups, mostly cairo_status_t vs cairo_test_status_t.
|
|
|
|
|
|
|
| |
This constitutes few fixes that are necessary to compile correctly
and reduce errors when using musl libc.
Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
|
|
|
|
|
| |
When builddir != srcdir, cairo_test_create_pattern_from_png
needs a non-NULL ctx to work with.
|
|
|
|
|
|
|
| |
Found via `codespell -i 3 -w -I ../cairo-word-whitelist.txt -L tim,ned,uint`
Follow up of 12cb59be7da
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
|
|
|
|
|
|
| |
The PS output from this test is > 100MB due to the duplicated images.
Using CAIRO_MIME_TYPE_UNIQUE_ID reduces the PS output to 650k, runs
considerably faster, and now produces correct output.
|
|
|
|
|
|
|
|
|
|
| |
This makes the results of the test suite more stable across different
environments, because it does not rely anymore on
CAIRO_FONT_FAMILY_DEFAULT (which on Windows is "Arial", on Mac
"Helvetica").
This change should not affect Linux environments, assuming that the
default font is already set to "DejaVu Sans".
|
| |
|
|
|
|
|
|
|
|
|
|
| |
ARRAY_LENGTH macro is used in perf's cairo-perf.h, src's cairoint.h,
test's cairo-test.h and in some internal header files of util's
directory.So to maintain consistency ARRAY_SIZE is replaced with
ARRAY_LENGTH macro.
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
|
|
|
|
|
| |
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ever since the test output was moved from test/ to test/output/, using
CAIRO_REF_DIR to make the test suite succeed no longer works. The test suite was
looking for the wrong file names.
This patch makes this work again. However, I am not sure that this really is the
correct fix. It just seems to work. :-)
Reported-by: Darxus <darxus@chaosreigns.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to musl libc author:
"C99 requires the FE_ macros to be defined if and only if the exception they
correspond to is supported"
So we define these macros to 0 if they are not supported. Support for these FPU
exceptions is not necessary for correct functionality, but makes some tests less
effective.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55771
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
| |
On some platforms (mingw) the alarm() configure check succeeds, but the
alarm function doesn't actually work.
|
|
|
|
|
| |
This avoids cluttering the test directory with thousands of PNG files
and makes the behavior more consistent with other OSes.
|
|
|
|
|
|
|
|
| |
The output directory should be made before trying to open log files in
it.
Fixes the bug causing cairo-test-suite to log to stderr on the first
run (i.e. when test/output does not exist).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch has been generated by the following Coccinelle semantic patch:
// Remove useless checks for NULL before freeing
//
// free (NULL) is a no-op, so there is no need to avoid it
@@
expression E;
@@
+ free (E);
+ E = NULL;
- if (unlikely (E != NULL)) {
- free(E);
(
- E = NULL;
|
- E = 0;
)
...
- }
@@
expression E;
@@
+ free (E);
- if (unlikely (E != NULL)) {
- free (E);
- }
|
|
|
|
| |
Don't open code xstrdup, just use it.
|
|
|
|
|
| |
cairo_test_log() can be implemented on top of cairo_test_logv() to
ensure that their behavior is consistent.
|
|
|
|
|
| |
The thread id is not used anymore (it is always == 0), so it can be
removed.
|
|
|
|
|
| |
The multi-threaded test path does not exist anymore and the ctx->thread
field is always 0, hence it can be removed.
|
|
|
|
| |
This code is unused and can be removed.
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
| |
With over two thousand references images now, it is starting to make the
test directory look cluttered!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
| |
Some POSIX functions are deprecated in MSVC and should instead be used
with an alternative name beginning with '_'.
|
|
|
|
|
|
|
|
|
|
| |
On Win32, the POSIX-compatible unlink function is named "_unlink".
A function named "unlink" exists, but does not have the same behavior
as the POSIX-specified one. This function makes the cairo test suite
behave incorrectly and immediately terminate with the message:
Error: Cannot remove cairo-test-suite.log: No error
|
|
|
|
|
|
|
|
|
| |
warning: cannot optimize possibly infinite loops
gcc does not detect that the "infinite" loops are actually just one or
two iterations, depending on the has_similar value being FALSE or
TRUE. It realizes it if the iteration variable and the iteration stop
value are both enum values.
|
|
|
|
|
|
|
|
|
|
| |
Use two levels of pthread support: a minimal level used to
build cairo itself, and a full level to build threaded apps
which want to use cairo. The minimal level tries to use
pthread stubs from libc if possible, but falls back to the
full level if that's not possible. We use CFLAGS=-D_REENTRANT
LIBS=-lpthread to find a real pthread library since that seems
to work on every unix-like test box we can get our hands on.
|
|
|
|
|
|
| |
make distcheck complains of remanents being left under test/ after a
clean, notably the files used to check the capabilities of a similar
surface and the fallback-resolution output.
|
|
|
|
|
|
|
| |
Hitting an error in a test case is almost as bad as crashing, and the
severity may be lost amidst "normal" failures. So introduce a new class
of ERROR so that we can immediately spot these during a test run, and
appropriately log them afterwards.
|
|
|
|
|
| |
Various minor tweaks to convert asserts into error returns and to
improve error checking on intermediate surfaces.
|
|
|
|
| |
Causes the log to contain information about the reference imagery used.
|
|
|
|
|
| |
This cleans the code and fixes a boolean logic error where this check
was done manually.
|
| |
|
|
|
|
|
|
|
| |
The new name is more descriptive than the rather opaque meta surface.
Discussed with vigour on the mailing list and #cairo:
http://lists.cairographics.org/archives/cairo/2009-July/017571.html
|
|
|
|
|
|
| |
Avoid pulling in the real pthread library if the application is single
threaded and not using pthreads, by linking against pthread-stubs
instead.
|
| |
|
|
|
|
|
|
| |
If a backend fails in exactly the same way as the image, then we can
safely assume that the failure is systematic and not an error in the
backend, so change the result to XFAIL.
|
|
|
|
|
|
|
|
| |
The test runner was extra strict about never letting a test put
the cairo_t into an error state, and never would it check for
the expectedness status of the failure. This patch moves the
check for a test being an XFAIL above the check on the cairo_t's
final status.
|
|
|
|
|
|
| |
The _POSIX_C_SOURCE 2001.. #define requires C99 mode and
clang on Solaris is strict about such things. Use configure
tests for flockfile() instead.
|
|
|
|
|
| |
I missed this call to get_image_surface() that is now being hit having
restored the reference image for dash-infinite-loop.
|
|
|
|
|
|
| |
In order to catch infinite loops whilst replaying and converting vector
surfaces to images (via external renderers) we need to also install
alarms around the calls to finish() and get_image().
|
|
|
|
| |
Note the crash if we hit a floating-point exception.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the DRM interface to h/w accelerate composition on image surfaces.
The purpose of the backend is simply to explore what such a hardware
interface might look like and what benefits we might expect. The
use case that might justify writing such custom backends are embedded
devices running a drm compositor like wayland - which would, for example,
allow one to write applications that seamlessly integrated accelerated,
dynamic, high quality 2D graphics using Cairo with advanced interaction
(e.g. smooth animations in the UI) driven by a clutter framework...
In this first step we introduce the fundamental wrapping of GEM for intel
and radeon chipsets, and, for comparison, gallium. No acceleration, all
we do is use buffer objects (that is use the kernel memory manager) to
allocate images and simply use the fallback mechanism. This provides a
suitable base to start writing chip specific drivers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handling clip as part of the surface state, as opposed to being part of
the operation state, is cumbersome and a hindrance to providing true proxy
surface support. For example, the clip must be copied from the surface
onto the fallback image, but this was forgotten causing undue hassle in
each backend. Another example is the contortion the meta surface
endures to ensure the clip is correctly recorded. By contrast passing the
clip along with the operation is quite simple and enables us to write
generic handlers for providing surface wrappers. (And in the future, we
should be able to write more esoteric wrappers, e.g. automatic 2x FSAA,
trivially.)
In brief, instead of the surface automatically applying the clip before
calling the backend, the backend can call into a generic helper to apply
clipping. For raster surfaces, clip regions are handled automatically as
part of the composite interface. For vector surfaces, a clip helper is
introduced to replay and callback into an intersect_clip_path() function
as necessary.
Whilst this is not primarily a performance related change (the change
should just move the computation of the clip from the moment it is applied
by the user to the moment it is required by the backend), it is important
to track any potential regression:
ppc:
Speedups
========
image-rgba evolution-20090607-0 1026085.22 0.18% -> 672972.07 0.77%: 1.52x speedup
▌
image-rgba evolution-20090618-0 680579.98 0.12% -> 573237.66 0.16%: 1.19x speedup
▎
image-rgba swfdec-fill-rate-4xaa-0 460296.92 0.36% -> 407464.63 0.42%: 1.13x speedup
▏
image-rgba swfdec-fill-rate-2xaa-0 128431.95 0.47% -> 115051.86 0.42%: 1.12x speedup
▏
Slowdowns
=========
image-rgba firefox-periodic-table-0 56837.61 0.78% -> 66055.17 3.20%: 1.09x slowdown
▏
|