| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Fixes failure in make release-check due by check-preprocessor-syntax.sh
due to requirement that cairoint.h be the first include for source files.
|
| |
|
|
|
|
|
| |
The PDF interpreter in my printer does not handle this correctly.
So instead we add the string delimiters '(' and ')' to each line.
|
|
|
|
|
|
|
|
|
|
|
|
| |
New implementations of _cairo_pattern_sampled_area and _cairo_pattern_get_extents
which produce a more accurate bounding box. These do not depend on side-effects
of analyze_filter, can handle different horizontal and vertical scales, filters
wider than 1 for down-scaling, and compute a somewhat tighter bounding box
in most cases.
I removed the pad output of _cairo_pattern_analyze_filter as it is unused.
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
|
|
|
|
|
|
|
|
|
|
|
| |
It will not use the fallback if the symbols in the previous patch
are turned on.
Also some code rearrangement to make this resemble the xlib version
more and to remove some suspect bugs. In particular meshes should not
work just because the translation is an integer.
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
|
|
|
|
|
|
|
| |
Currently these are always false, but if XRender use a pixman that
supports filtering these could be turned on for that version.
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fallback is not used if the symbols defined in the previous patch to
indicate if XRender does GOOD/BEST are true.
This patch also includes some changes to take advantage of the fact that
if there is an integer translation analyze_filter will already have set
the filter to NEAREST.
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
|
|
|
|
|
|
|
|
| |
Currently these are always false, but if some version of xlib uses
a pixman supporting filtering they could be changed to return true
for that version.
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
|
|
|
|
|
|
|
|
| |
The analysis to deterimine if the GOOD filter can be replaced with
the BILINEAR filter is moved to this function so it can be used
by backends other than the image backend.
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
|
| |
|
|
|
|
|
|
|
| |
Fix header ordering for some recently added code so cairo internal
headers are included first. Quells two make check errors.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=84638
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the following warning introduced in a recent commit reported by
~suv:
CC cairo-quartz-image-surface.lo
cairo-quartz-image-surface.c:382:37: warning: incompatible pointer types
passing 'cairo_quartz_image_surface_t *'
(aka 'struct cairo_quartz_image_surface *') to parameter of type
'const cairo_surface_t *' (aka 'const struct _cairo_surface *')
[-Wincompatible-pointer-types]
if (! _cairo_surface_is_quartz (surface)) {
^~~~~~~
./cairo-quartz-private.h:87:50: note: passing argument to parameter 'surface' here
_cairo_surface_is_quartz (const cairo_surface_t *surface);
References: https://bugs.freedesktop.org/show_bug.cgi?id=84569
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>
|
|
|
|
|
|
|
|
|
| |
Cairo cannot build with Quartz enabled since
573ddfc3d5c08c37b95a21e0a1b34acecc646053, because of a double
definition of _cairo_surface_is_quartz().
References: https://bugs.freedesktop.org/show_bug.cgi?id=84569
Signed-off-by: Andrea Canciani <ranma42@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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 03c3d4b7c159a3004071522bac2461e553fec211
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
This is a follow-up patch on top of 150c1e7044c57443d458e12bfc427d3a019cb60b
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
|
|
| |
Return an error device instead
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=58061
|
|
|
|
|
|
| |
Return an error surface instead.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=58061
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Change suggested by Chris Wilson. This will enable setting different
vbo sizes for GL vs. EGL.
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 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>
|
|
|
|
|
| |
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
|
|
|
|
|
| |
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
After converting, the number of boxes should only count the number of
non-zero boxes and forget about the zero-sized boxes we skipped over.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81699
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rectangular tesselation routines rely on the presuming that all the
boxes it has to handle are already filtered to remove empty boxes.
<< /width 800 /height 600 >> surface context
0.0848671 0 0 0.0848671 39.907812 5.608896 matrix transform
8 0 m 12.417969 0 16 3.582031 16 8 c 16 12.417969 12.417969 16 8 16 c
3.582031 16 0 12.417969 0 8 c 0 3.582031 3.582031 0 8 0 c h
clip
16 0 m 8 8 l 16 16 l h
clip
0 0 16 16 rectangle
fill
Triggers the error given a traps tesselator like cairo-xlib.
Reported-by: Henrique Lengler <henriqueleng@openmailbox.org>
Analyzed-by: Massimo <sixtysix@inwind.it>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81699
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
| |
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82987
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
| |
Found via static analysis.
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>
Reviewed-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
| |
Bug 81709
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(changed to use determinant funciton and remove debug printf)
Modifies _cairo_matrix_has_unity_scale to return true for 90 degree rotations
by allowing error caused by inaccuracy in trig functions.
This fails after 14 additions of M_PI_2 to itself as a float argument to
cairo_rotate, but the failure is in the detection of the integer translate,
not in the trig components. I believe this is due to the matrix inversion,
which may need similar rounding.
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the debug hack from
commit f337342c88092a251dc00476c4a9880d1cb90822
Author: Bill Spitzak <spitzak@gmail.com>
Date: Fri Jul 18 18:46:26 2014 -0700
V6 image: Use convolution filters for sample reconstruction when downscaling
as it forces the fallback image surface for xlib causing severe
performance degradation.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82002
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Bill Spitzak <spitzak@gmail.com>
Cc: Bryce Harrington <b.harrington@samsung.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This version removes testing code and has some changes to match my current
pixman version. My proposed pixman patch (not finished yet) will produce
exactly the same results as this cairo patch.
This code contains an all-new filter generator to replace the one that is
in pixman. Results in 222 pass/298 failed image tests, which is much better
than the previous versions of this patch.
Filter generator (which should probably be in pixman):
- Single filter, no "reconstruction" and "sample" filter
- Filters for derivative < 1 work
- Fixed IMPULSE and BOX
- Added TENT, CATMULL_ROM, NOTCH. Remove LANZCOS2.
- Renamed CUBIC to MITCHELL
Cairo's filter settings:
- CAIRO_FILTER_GOOD: uses BOX filter for scales less than .75 in either
direction. Uses PIXMAN_FILTER_GOOD (ie BILINEAR) otherwise.
- CAIRO_FILTER_BEST: uses CATMULL filter always. Upscaling more than 2x will
produce anti-aliased square pixels, similar to OS/X.
- CAIRO_FILTER_GAUSSIAN: this obsolete value is used to test other filters.
The program must declare and poke the filter into the static varialbe
ikernel. This should be removed for production code.
NYI: This version uses the fallback for xlib always. The xlib and xcb backends
must be rewritten to use the fallback version if filtering is needed. Or the
filtering code must be moved to XRender.
|
| |
|
|
|
|
|
|
|
|
|
| |
_cairo_int128_negate and _cairo_int128_not are #defines of
_cairo_uint128_negate and _cairo_uint128_not respectively. The function
implementations should use the actual function name not the aliases. On
systems without a uint128 type, these could lead to build issues.
Credit for finding this go to Dr. Peter Barnes, LLNL.
|
|
|
|
|
|
|
|
| |
Enable the DEBUG support for skia backend to provide more
descriptive information on the unexpected operational behaviours.
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
|
|
|
|
| |
This works around http://llvm.org/PR20216.
|
|
|
|
|
|
|
|
|
| |
This fixes several build related issues for the skia backend
which is introduced due to skia source up-gradation.
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
|
|
|
|
|
|
|
|
| |
Introduced a new inline function _cairo_surface_is_xcb() as similar to
_cairo_surface_is_image() and used the same to check for xcb surface
type
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
|