| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Fix how offset, scale and transparency are handled.
Also do the same change in the "win32-printing" backend as it has a copy of the code from PDS, PS and SVG backends.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This reverts commits
6ad8c96fd81e06cea6ada4a83e7c5614f150f914,
a3f97d1d2e77a0fee4ca03d5dc9968952a440561,
25abe582982caeb07d1e0af4acca53bb110a33bf
I should know better by now than to push without checking for outstanding
changes.
|
|
|
|
|
|
|
|
|
| |
We need to occasionally force fallbacks whilst testing the PDF
output, so export a debug interface to do so in order to avoid poking
around inside cairo internals.
References: https://bugs.freedesktop.org/show_bug.cgi?id=48577
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
| |
The thread id is not used anymore (it is always == 0), so it can be
removed.
|
|
|
|
|
|
|
|
|
|
| |
boilerplate/cairo-boilerplate-pdf.c | 4 ++++
boilerplate/cairo-boilerplate-ps.c | 4 ++++
boilerplate/cairo-boilerplate-svg.c | 4 ++++
build/configure.ac.system | 2 +-
4 files changed, 13 insertions(+), 1 deletions(-)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
| |
The Microsoft C Compiler does not accept empty-initialized arrays:
cairo-boilerplate-win32-printing.c(373) : error C2059: syntax error : '}'
cairo-boilerplate-win32-printing.c(374) : warning C4034: sizeof returns 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A deficiency of cairo-perf-trace is that it currently always uses similar
surfaces for new surface which are kindly cleared by Cairo. This does
not accurately reflect the captured trace and introduces large bandwidth
overheads that distort the profiles.
So we introduce a new boilerplate hook so that the targets can create a
surface without incurring additional overheads.
[Fixes the broken partial commit of bf1b08d066e.]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
cairo_set_fallback_resolution() does not work when testing rgb24 surfaces
|
|
|
|
|
|
|
|
|
| |
This function is supposed to describe the backend in use. The describe
function is optional - and therefore initialized as NULL everywhere.
Note:
It is well known that the xlib backend uses X. What is not known is what
version the server supports or what graphics card it is running on. That
is the information the describe vfunc is supposed to provide.
|
|
|
|
|
| |
Ran a script to align the formal parameters of functions and
collapse spaces to tabs in code.
|
|
|
|
| |
Avoids gcc warnings when libpoppler version isn't good enough.
|
|
|
|
|
| |
Be paranoid and explicitly call finish to cleanup self-referential leaks
when using paginated/recording surfaces.
|
|
|
|
|
|
| |
In order to exercise the newly restored r5g6g5 support, we need to
create an appropriate surface and feed it through the test and
performance suites.
|
|
|
|
|
|
| |
We were using _GNU_SOURCE throughout the codebase, so simply define it
once during configure. This is the easiest method to enable recursive
mutexes using pthreads, as required in a pending patch.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Improve detection, reporting and disabling of test backends when we lack
the required libraries and utilities.
|
|
|
|
|
|
|
| |
For the purposes of benchmarking it is useful to run cairo-perf against a
different library from the one it was compiled against. In order to do so,
we need to check that the runtime library contains the required entry
points for our targets - which we can check by using dlsym.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
▏
|
|
|
|
|
|
|
|
|
|
|
| |
By moving the backend target definition out of the massive amlagamated
block in cairo-boilerplate.c and into each of the
cairo-boilerplate-backend.c, we make it much easier to add new targets as
the information need only be entered in a single file and not scattered
across three. However, updating the target interface means trawling across
all the files -- except given that I found it difficult maintaining the
single massive array I do not see this as an increase in the maintenance
burden.
|
|
|
|
|
|
|
|
|
|
|
| |
Test case for:
Bug 22441 -- Unexpected shift with push_group and pop_group
https://bugs.freedesktop.org/show_bug.cgi?id=22441
This is a test that demonstrates the error in the pdf backend when using
groups on surfaces with non-integer sizes. In order to create such a
surface, we need to update the boilerplate to use doubles instead of
integers when specifying the surface size.
|
| |
|
|
|
|
| |
Catch a few -out.* hiding in boilerplate.
|
|
|
|
|
|
|
|
|
|
|
| |
For this we extend the boilerplate get_image() routines to extract a
single page out of a paginated document and then proceed to manually
check each page of the fallback-resolution test.
(Well that's the theory, in practice SVG doesn't support multiple pages
and so we just generate a new surface for each resolution. But the
infrastructure is in place so that we can automate other tests,
e.g. test/multi-pages.)
|
|
|
|
|
|
|
| |
One possibility for a read failure whilst converting the image is if the
external utility crashed. This information is important for the test suite
as knowing input that causes the converter to crash is just as vital as
identifying a crash within the library.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Compare the current output against a previous run to determine if there
has been any change since last time, and only run through imagediff if
there has been. For the vector surfaces, we can check the vector output
first and potentially skip the rasterisation. On my machine this reduces
the time for a second run from 6 minutes to 2m30s. As most of the time,
most test output will remain unchanged, so this seems to be a big win. On
unix systems, hard linking is used to reduce the amount of storage space
required - others will see about a three-fold increase in the amount of
disk used. The directory continues to be a stress test for file selectors.
In order to reduce the changes between runs, the current time is no longer
written to the PNG files (justified by that it only exists as a debugging
aid) and the boilerplate tweaks the PS surface so that the creation date
is fixed. To fully realise the benefits here, we need to strip the
creation time from all the reference images...
The biggest problem with using the caches is that different runs of the
test suite can go through different code paths, introducing potential
Heisenbergs. If you suspect that caching is interfering with the test
results, use 'make -C test clean-caches check'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to achieve substantial speed improvements the external conversion
utilities are rewritten as a daemon that communicates with the test suite
over a local socket. This is faster as it avoids the libtool and dynamic
linker overhead for each invocation, the caches persist between tests and
we no longer require a round trip through libpng.
The daemon is started automatically by the test suite and if communication
cannot be established then it falls back to using a pipe to a normal
conversion utility. The daemon will then persist for 60 seconds waiting
for further connections.
Of course any memory leak (stares at poppler) is exacerbated.
|
|
|
|
|
|
|
| |
If the external conversion utility was killed by a signal (e.g. the user
sent SIGINT), raise that signal within our process as well. This means
that a crash inside poppler or rsvg will be flagged as a crash inside the
test suite, and makes interrupting the test suite far more responsive.
|
|
|
|
|
|
|
|
|
| |
As Behdad suggested, we can dramatically speed up the test suite by
short-circuiting the write to a png file, only to then immediately read it
back in. So for the raster based surfaces, we avoid the round-trip through
libpng by implementing a new boilerplate method to directly extract the image
buffer from the test result. A secondary speedup is achieved by caching the
most recent reference image.
|
|
|
|
|
|
|
|
| |
Construct the test name to pass to the boilerplate creation routines such
that it uniquely identifies the test in terms of test, target, content and
pass (similar, offset, thread). This allows the vector targets to create
output different output files for each test, whereas before, later tests
would overwrite existing files making debugging more difficult.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to run under memfault, the framework is first extended to handle
running concurrent tests - i.e. multi-threading. (Not that this is a
requirement for memfault, instead it shares a common goal of storing
per-test data). To that end all the global data is moved into a per-test
context and the targets are adjusted to avoid overlap on shared, global
resources (such as output files and frame buffers). In order to preserve
the simplicity of the standard draw routines, the context is not passed
explicitly as a parameter to the routines, but is instead attached to the
cairo_t via the user_data.
For the masochist, to enable the tests to be run across multiple threads
simply set the environment variable CAIRO_TEST_NUM_THREADS to the desired
number.
In the long run, we can hope the need for memfault (runtime testing of
error paths) will be mitigated by static analysis. A promising candidate
for this task would appear to be http://hal.cs.berkeley.edu/cil/.
|
|
|
|
|
| |
This freezes the current (buggy) poppler result in the test suite
so that we will notice any future regressions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had several pdf tests disabled waiting for this bug fix:
Poppler does not correctly handle knockout groups
https://bugs.freedesktop.org/show_bug.cgi?id=12185
That's in place for poppler now, so we're turning the tests
back on. Some of the affected tests now pass perfectly:
over-above-source
over-around-source
over-below-source
over-between-source
Some just needed new reference images:
operator-clear
clip-operator-pdf-argb32
The remaining tests still fail, but none of the failures can
obviously be ascribed to just poppler problems:
clip-operator-pdf-rgb24
operator-source
unbounded-operator
The first two have some serious problems, while in the case
of unbounded-operator the problem is extremely minor (a white
grid appears in the background where the reference image is
all black).
|
|
|
|
|
|
|
| |
These are failing due to (already reported) poppler bugs.
There were also problems with the gradients in the PDF
files previously, but these have recently been fixed.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following 7 tests currently fail with poppler due to:
Poppler does not correctly handle knockout groups
https://bugs.freedesktop.org/show_bug.cgi?id=12185
and we've verified with acroread that the cairo-pdf output
does render as intended there. The disabled tests are
clip-operator, operator-clear, operator-source, over-above-source,
over-around-source, over-below-source, and over-between-source.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The following four tests are disabled:
gradient-alpha, linear-gradient, text-pattern, trap-clip
We don't use XFAIL as that would disable all backends, (but
we can still usefully use these tests on backends other than
PDF).
|
|
|
|
| |
in favor of cairo_boilerplate_pdf_surface_force_fallbacks.
|
| |
|
|
|