Fixes a make check error.
Checking that .libs/libcairo.so has the same symbol list as cairo.def
126a127
> cairo_lines_compare_at_y
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=84638
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
The quartz-image backend uses _cairo_surface_is_quartz(), which
therefore needs to be made available to it. Fixed as suggested by
Bryce in the referenced bugreport.
References: https://bugs.freedesktop.org/show_bug.cgi?id=84569
Signed-off-by: Andrea Canciani <ranma42@gmail.com>
When investing the symmetry of the raterisation, we want to have a
simple replay of all of the original geometry through a the flipped
recording surface. This reduces the worry about artifacts from the
clipped rendering.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As pixman uses an accumulation mask, it oversamples neighbouring edges
within a cell. We can reduce the impact of this by eliminating
overlapping triangles/trapezoids from being passed into pixman.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
(And include a git add missed from commit
ccd48b3464
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Sep 30 14:06:21 2014 +0100
test: Remove more duplicated reference images
but were mostly invalidated by the rasteriser changes anyway).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If all the edges start at the very beginning of the whole row, we can
merge them and include check for intersections/endings during the row.
This allows us to enable fast analytic processing for even the very
first row on pixel aligned vertices.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We use two different methods within tor to compute the coverage.
The first is that we iterate over every sample point within the pixel
and see if it is covered. The second is that we look at a whole pixel
and analytically compute the coverage inside (if we have no
intersections within that row).
One side effect of
commit 03c3d4b7c1
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Sep 30 08:44:43 2014 +0100
tor: Fix loss of precision from projection onto sample grid
was to compute our X coordinates for the sample locations (offset by
half a subrow) and that in order to compute the analytical pixel
coverage correctly, we therefore need to backstep by half the subrow to
the pixel boundary.
References: https://bugs.freedesktop.org/show_bug.cgi?id=84396
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In order to check the behaviour of the analytic rasteriser inside tor,
let's compare it against a very simple rasteriser that uses a rectiliner
256x256 sample grid.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Using CAIRO_OPERATOR_OVER in case causes oversampling of the coincident
edges, to measure coverage we should only use ADD. :|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When updating the quorem between cells, we would lose the overflow
increment as it was only applied locally and not preserved by updating
the quorem.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Currently coverage is marked as slow. It is slower than the typical
test, but it is quite a useful check on our rasterisation quality
without going too far overboard (unlike partial-coverage!).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The goal is to preserve the precision in the gradients of the edges and
only apply the projection into the final cell location. We also include
the half-subrow offset as spotted by Massimo.
References: https://bugs.freedesktop.org/show_bug.cgi?id=84396
Testcase: coverage-rhombus
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we have both a argb32 and rgb24 reference image that are identical,
we can replace them with a plain reference image. I also prefer to have
argb32/rgb24 versions of the reference images if rgb24 differs from the
plain reference.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This is a follow-up patch on top of 150c1e7044
As discussed in the mailing list, http://lists.cairographics.org/archives/cairo/2014-September/025647.html,
check if the surfaces are of particular backend type or not, before proceeding further.
These changes are based on _cairo_surface_is_xlib() and _cairo_surface_is_image()
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
As the target renderers operate at a different sample resolution then we
use internally for coordinate representation, there is always a potential
for discrepancies in the line gradients when passing around trapezoids.
To overcome this, the protocol specification of trapezoids uses the full
lines and vertical range as opposed to vertices and so long as we always
use the same lines for conjoint trapezoids, they remain abutting in the
rasteriser.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84115
Testcase: bug-84115
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Massimo noticed that the record/record-flip were not being rasterised as
identical mirror images due to a half-subpixel offset in the tor scan
converter. This test attempts to reproduce this error by rendering a
rhombus around the origin of each cell (that is it generates 4 mirror
images of a triangle in the 4 different orientations0. The expectation
is that each pixel in the group is lit identically as the coverage is
identical.
References: https://bugs.freedesktop.org/show_bug.cgi?id=84396
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
glib and dlfcn exist on windows, but sphinx code uses a lot of
Unix-only API
Fixes the following build error on mingw-fedora
CC cairo-boilerplate-system.lo
../../../util/cairo-sphinx/sphinx.c:8:22: fatal error: sys/mman.h: No such file or directory
compilation terminated.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=63043
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Currently the very first point on the arc will be the first interpreted
location along the spline used to approximate the arc. This will be
close, but not quite the exact point the user intended the arc to run
from, so begin the arc with a line-to the initial point.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When using clang -O4, the compiled test object is output in bitcode
format rather than as an ELF object, so when we grep the test value from
the object it fails. To work around this, go ahead and link the test
object into an executable, and then grep against this native binary
instead of the compiler's intermediary object.
We need to add __attribute__((used)) to ensure the d variable doesn't
get optimized out during linking, since it's not referenced in the
test's main().
Patch authored by cmuelle8 <abendstund@gmail.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63310
Refactor out a cairo_get_locale_decimal_point() routine to handle a case
where localeconv() is not available.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=70492
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
[edit: Condensed cairo_get_locale_decimal_point and conditionalized
locale.h inclusion. -- bryce]
The default VBO size was reduced from 256k to 16k because embedded
devices had trouble with the larger memory demands of a big VBO. My
testing[1] indicates this incurred a 5% performance loss on at least one
of Cairo's performance tests. Further testing showed that with
late-model graphics cards, further performance benefits can be seen with
even larger VBO sizes, up to 8.3% at 1M for Intel.
Now that we can set the vbo size differently for different backends, set
it to the lower value (16k) for EGL, and higher (1M) for GL.
1: http://www.bryceharrington.org/wordpress/2013/08/vbo-size/
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
The default VBO size was reduced from 256k to 16k last year in commit
90860241 due to problems with larger VBOs on embedded hardware.
However, that change resulted in a 5% performance impact to the
firefox-fishbowl benchmark when using the spans or traps compositors.
This patch doesn't change the VBO size, but does permit it to be
altered via an environment variable, to facilitate testing.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
This test exercises error scenario when creating over sized egl surface
that is larger than maximum framebuffer or texture dimensions of the
context
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
This patch makes a bunch of tests pass again. The first hunk one fixes a
shameful oversight (whoops), the second one effectively reverts
e691d242. That change broke 102 xcb and 70 xlib tests, including a
bunch of *twin-antialias-* test cases. Patch thanks to Uli Schlachter.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
There is a similar code in the Xlib backend. The logic here is the same, but
XCB doesn't support X resources directly, so there is some custom code
to get and parse the resources from the root window.
Signed-off-by: Lukáš Lalinský <lukas@oxygene.sk>
Reviewed-by: Uli Schlachter <psychon@znc.in>
This patch fixes majorly 2 kinds of warning issues:
(1)
cc1plus: warning: command line option '-Wold-style-definition' is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wdeclaration-after-statement' is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wnested-externs' is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wmissing-prototypes' is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wbad-function-cast' is valid for C/ObjC but not for C++ [enabled by default]
Solution: Enable these warnings only for C compiler and not for C++
(2)
cairo-qt-surface.cpp: In function 'cairo_int_status_t _cairo_qt_surface_fill(void*, cairo_operator_t, const cairo_pattern_t*, const cairo_path_fixed_t*, cairo_fill_rule_t, double, cairo_antialias_t, const cairo_clip_t*)':
cairo-qt-surface.cpp:852:5: warning: inlining failed in call to 'PatternToBrushConverter::PatternToBrushConverter(const cairo_pattern_t*)': --param max-inline-insns-single limit reached [-Winline]
cairo-qt-surface.cpp:1339:38: warning: called from here [-Winline]
cairo-qt-surface.cpp:390:1: warning: inlining failed in call to 'QPainterPath _ZL10path_to_qtPK17_cairo_path_fixedPK13_cairo_matrix.part.13()': call is unlikely and code size would grow [-Winline]
cairo-qt-surface.cpp:1306:1: warning: called from here [-Winline]
cairo-qt-surface.cpp:1051:5: warning: inlining failed in call to 'PatternToBrushConverter::~PatternToBrushConverter()': call is unlikely and code size would grow [-Winline]
Solution: Add __attribute__ ((noinline)) to the function as mentioned in
http://stackoverflow.com/questions/11724235/warning-for-template-with-g-o2-or-os-o-o1 (Edit 3)
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
cppcheck analysis tool reports the following issues when run on the
latest Cairo source.
$ grep "(error)" cppcheck_error_log.txt
[test/pdf-mime-data.c:58]: (error) Possible null pointer dereference: file - otherwise it is redundant to check if file is null at line 53
[test/pdf-mime-data.c:75]: (error) Resource leak: fp
$
The proposed changes fixes the above issues.
And also it does some refactoring to print the appropriate error messages
for each error condition in read_file() function and also to free the allocated
data buffer.
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
cppcheck analysis tool reports the following issues when run on the
latest Cairo source.
$ grep "(error)" cppcheck_error_log.txt
[src/skia/cairo-skia-surface.cpp:245]: (error) Memory leak: surface
$
The proposed changes fixes the above issues.
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>