summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* pattern: Restore dropped inclusion of cairoint.h1.14.0Bryce Harrington2014-10-131-0/+2
| | | | | 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.
* NEWS: Flesh out docs for new APIsBryce Harrington2014-10-131-1/+1
|
* pdf: don't use '\' to split strings across multiple linesAdrian Johnson2014-10-121-1/+1
| | | | | The PDF interpreter in my printer does not handle this correctly. So instead we add the string delimiters '(' and ')' to each line.
* image: Corrected extents calculationsBill Spitzak2014-10-106-153/+176
| | | | | | | | | | | | 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>
* xcb: Use image fallback for GOOD/BEST filtersBill Spitzak2014-10-101-18/+16
| | | | | | | | | | | 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>
* xcb: Add switches for whether XRender supports GOOD/BEST filteringBill Spitzak2014-10-102-1/+15
| | | | | | | 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>
* xlib: Use image fallback for GOOD/BEST filtersBill Spitzak2014-10-101-9/+14
| | | | | | | | | | | 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>
* xlib: Add symbols to indicate if XRender supports GOOD/BEST filteringBill Spitzak2014-10-101-0/+2
| | | | | | | | 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>
* image: Move filter decision to _cairo_pattern_analyze_filterBill Spitzak2014-10-102-14/+44
| | | | | | | | 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>
* test: Teach check-preprocessor-syntax.sh about -inlines.hChris Wilson2014-10-091-2/+2
|
* Get make check back to a happy spotBryce Harrington2014-10-032-4/+4
| | | | | | | 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
* Declare as private the new cairo_lines_compare_at_y symbolBryce Harrington2014-10-031-3/+4
| | | | | | | | | | | 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>
* quartz: Check for quartz surface type before conversionBryce Harrington2014-10-031-1/+1
| | | | | | | | | | | | | | | | | | | 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>
* quartz-image: Fix buildAndrea Canciani2014-10-032-4/+4
| | | | | | | | | 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>
* quartz: Fix buildAndrea Canciani2014-10-031-14/+8
| | | | | | | | | 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>
* image: Eliminate self-intersections for the pixman traps compositorChris Wilson2014-10-021-0/+32
| | | | | | | | 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>
* tor: Enable analytic processing for starting rowsChris Wilson2014-10-021-10/+17
| | | | | | | | | 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>
* tor: Perform analytic coverage over the pixel not sample pointsChris Wilson2014-10-021-18/+49
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* tor: Review full-row walkerChris Wilson2014-09-301-52/+34
| | | | | | | | 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>
* tor: Fix loss of precision from projection onto sample gridChris Wilson2014-09-301-157/+174
| | | | | | | | | | 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>
* src: check the surface backend for NULLRavi Nanjundappa2014-09-294-5/+60
| | | | | | | | | | 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>
* stroke,traps: Emit join without loss of precisionChris Wilson2014-09-298-257/+530
| | | | | | | | | | | | | | 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>
* arc: Insert the initial point on the arcChris Wilson2014-09-241-0/+4
| | | | | | | | | 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>
* Fix compilation with bionic libcAdrian Johnson2014-09-235-11/+24
| | | | | | | | | | | 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]
* Don't return NULL to clients when getting deviceBryce Harrington2014-09-222-4/+7
| | | | | | Return an error device instead Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=58061
* Don't return NULL to clients when getting imageBryce Harrington2014-09-223-3/+3
| | | | | | Return an error surface instead. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=58061
* gl: Increase default VBO size on GL to 1MBryce Harrington2014-09-192-1/+7
| | | | | | | | | | | | | | | | 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>
* gl: Track the VBO size as a property of the ctxBryce Harrington2014-09-194-15/+17
| | | | | | | 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>
* cairo-gl: Make VBO size run-time settableBryce Harrington2014-09-194-4/+30
| | | | | | | | | | | | 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>
* Disable font options for xcb.Bryce Harrington2014-09-171-1/+7
| | | | | | | | | 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>
* win32 printing: fix image scale when GDI scale is not identityAdrian Johnson2014-09-141-0/+1
|
* xcb: Initialize font options from Xft resourcesLukáš Lalinský2014-09-125-3/+435
| | | | | | | | | 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>
* qt: Suppress warnings in qt backend buildRavi Nanjundappa2014-09-111-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix _cairo_mesh_pattern_equal() when cairo_mesh_patch_t structs are differentMaks Naumov2014-08-281-1/+1
| | | | | Signed-off-by: Maks Naumov <maksqwe1@ukr.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* Fix font x_scale value in _compute_transform()Maks Naumov2014-08-271-1/+1
| | | | | Signed-off-by: Maks Naumov <maksqwe1@ukr.net> Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
* src: Fix memory issue reported by cppcheck static analysis toolRavi Nanjundappa2014-08-271-1/+3
| | | | | | | | | | | | | | 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>
* traps,xcb: Set the box count after filteringChris Wilson2014-08-252-4/+5
| | | | | | | | 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>
* traps,xcb: Prefilter zero-area boxes when converting trapsChris Wilson2014-08-232-22/+35
| | | | | | | | | | | | | | | | | | | | | | 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>
* xcb: Correctly check for image surface for inplace uploadUli Schlachter2014-08-231-1/+2
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82987 Signed-off-by: Uli Schlachter <psychon@znc.in>
* Fix width and height args for _cairo_xcb_connection_copy_area()Maks Naumov2014-08-211-1/+1
| | | | | | | Found via static analysis. Signed-off-by: Maks Naumov <maksqwe1@ukr.net> Reviewed-by: Uli Schlachter <psychon@znc.in>
* win32 print: fix cache_frozen assertionsRodrigo Rivas Costa2014-08-191-1/+7
| | | | Bug 81709
* V5: Use NEAREST filter when possibleBill Spitzak2014-08-143-20/+26
| | | | | | | | | | | | | | (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>
* xlib: Undo debug hack to force fallbacksChris Wilson2014-08-011-1/+1
| | | | | | | | | | | | | | | | | | 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>
* V6 image: Use convolution filters for sample reconstruction when downscalingBill Spitzak2014-07-252-2/+420
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* xlib: Fix mispelling in a commentBryce Harrington2014-07-241-1/+1
|
* cairo-wideint: Fix typo in two cairo_uint128 functionsBryce Harrington2014-07-241-4/+4
| | | | | | | | | _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.
* skia : Add Debug support for skia backendRavi Nanjundappa2014-07-101-11/+17
| | | | | | | | 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>
* clang-cl: Use size of the pointer explicitlyJeff Muizelaar2014-07-091-1/+1
| | | | This works around http://llvm.org/PR20216.
* skia: update the source to build with the latest skiaRavi Nanjundappa2014-07-083-28/+54
| | | | | | | | | 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>
* xcb: make use of _cairo_surface_is_xcb to check for surface typeRavi Nanjundappa2014-07-074-4/+19
| | | | | | | | 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>