summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-12-04Fix broken rotationsperspective-transformBryce Harrington1-4/+4
Patch thanks to Derek Foreman <derekf@osg.samsung.com>
2014-11-27path: Don't use fast path if there is projective transformationBryce Harrington1-1/+1
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2014-11-27matrix: Make the other *_rel_* routines non-relative internallyBryce Harrington1-18/+28
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2014-11-27matrix: Refactor out two temporary variablesBryce Harrington1-10/+5
This makes the similarities and differences between cairo_matrix_transform_distance and cairo_matrix_transform_point easier to spot. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2014-11-27matrix: Update code docs for projective transformBryce Harrington2-7/+17
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2014-11-27Enable projective transformsBryce Harrington4-57/+102
This is a rebase and cleanup of a patch proposed by Maarten Bosmans in 2010 to add projective transformations to Cairo. In dusting it off, I've removed some whitespace changes and reordered a few things to make the patch clearer; also, the changes to cairo_rel_line_to() needed to be moved to _cairo_default_context_rel_line_to() when cairo_backend_t was introduced (commit 83bfd85a). His original email follows: """ This is a first attempt to add projective transformations to Cairo. It is far from complete, but mostly meant to get the discussion going about how such a feature should be implemented. The patch does the following: - add px and py, the first two elements of the bottom row to cairo_matrix_t. These where until now always assumed zero. - modify the function in cairo-matrix.c to respect these elements in all matrix operations and checks. - change cairo_rel_line_to such that it does the correct thing. So is adding px and py the right approach? (btw. may be there are some more appropriate names for these elements) As now eight elements of the 3x3 matrix are explicitly defined and only the last one assumed 1, it may be better to switch all the matrix code to use the pixman floating point matrix. The main problem with adding projective transformations is that translational invariance isn't guaranteed anymore. So that means that probably all uses of cairo_matrix_transform_distance must be changed. As an example I changed cairo_rel_line_to to add the distances to the current point itself. If it is decided that this patch uses the right approach, at least these things have to be addressed for the patch to be complete: - Check the test suite, right now there will undoubtedly be failures. - Add some tests to check the projective transforms. - Adapt other rel_ function not to use transform_distance. - Check how the performance is affected, mainly for the non-projective case. Although there are some divisions added by the patch, I suspect that the matrix operations aren't that performance critical. Maarten """ http://lists.cairographics.org/archives/cairo/2010-August/020507.html Signed-off-by: Bryce Harrington <b.harrington@samsung.com> Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2014-11-20win32: Fix compilation of 'cairo-path-stroke-traps.c' with MSVC8Hans Breuer1-4/+6
"The issue here is that Visual Studio 2005+ is quite strict on type conversions (so it wants code to be clear enough on conversions)." Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=84908
2014-11-20Refactor ARRAY_LENGTH macro definitions in test codeBryce Harrington7-16/+6
2014-11-20test: Use ARRAY_LENGTH macroBryce Harrington3-4/+3
2014-11-20pdf-operators: fix bug with RTL textAdrian Johnson1-1/+5
bug 86461
2014-11-12Fix one more warning from check-doc-syntax.shRavi Nanjundappa1-2/+2
$ ./check-doc-syntax.sh Checking documentation for incorrect syntax ./cairo-pattern.c (3342): ERROR: Will invalid doc id (should be 'cairo_...:') The proposed changes fixes the warning about the documentation style used in cairo. Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
2014-11-06xcb: Don't crash when swapping a 0-sized glyphAdam Jackson1-0/+6
malloc(0) needn't return NULL, and on glibc, doesn't. Then we encounter a loop of the form do { ... } while (--c), which doesn't do quite what you were hoping for when c is initially 0. Since there's nothing to swap in this case, just bomb out. Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-11-06xlib: Don't crash when swapping a 0-sized glyphAdam Jackson1-0/+6
malloc(0) needn't return NULL, and on glibc, doesn't. Then we encounter a loop of the form do { ... } while (--c), which doesn't do quite what you were hoping for when c is initially 0. Since there's nothing to swap in this case, just bomb out. Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-31Improve performance of cpu_to_be32 and be32_to_cpuAdrian Johnson1-1/+1
By switching to the more common form, gcc and clang emit a single bswap instruction and truetype subsetting of large fonts runs about 15% faster.
2014-10-31pdf-operators: only wrap text strings for PS outputAdrian Johnson6-16/+31
since the PS Document Structing Conventions impose a 255 character line limit. PDF does not require wrapping. pdf-operators is designed to emit the same output for PS and PDF. Unfortunately some PDF interpreters don't like strings split with '\\\n' and some PS interpreters don't like strings split with ')('. So we are forced to make pdf-operators handling string wrapping differently for PDF and PS. Bug 85662
2014-10-29Drop the target-specific huge-radial.pdf.*.ref.png imagesBryce Harrington2-0/+0
These two images are mis-rendered (clearly evident from visual inspection). By removing them, the test will fall back to the more general format-specific images, huge-radial.argb32.ref.png and huge-radial.rgb24.ref.png. Note that the huge-radial.pdf tests still fail to pass, but the pdiff looks more sensible. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66218 Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2014-10-29RELEASING: Be explicit as to which tag is pushedBryce Harrington1-1/+1
2014-10-28Fix warnings from check-doc-syntax.shRavi Nanjundappa1-2/+2
$ ./check-doc-syntax.sh Checking documentation for incorrect syntax ./cairo-pattern.c (3346): ERROR: Will bad line: ' */' ./cairo-pattern.c (3346): ERROR: Will documentation comment not closed with **/ ./cairo-pattern.c (3422): ERROR: _cairo_pattern_sampled_area invalid doc id (should be 'cairo_...:') The warnings are about the documentation style used in cairo Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
2014-10-21build: fix regression on mingwAdrian Johnson1-2/+2
7cfebce1 removed the filename extension for executables. Patch from http://sourceforge.net/p/inkscape/mailman/message/32939144/ Bug 85120
2014-10-19tor-scan-converter: can't do_fullrow when intersection in row + 0.5subrowMassimo Valentini1-2/+2
the active edges list must be left sorted at the next possible use and since full_row does not deal with intersections it is not usable when there is an intersection in the top half of the next row first subrow Reported-and-tested-by: Matthew Leach Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85151 Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-18Revert "Add execution bit for make-cairo-test-constructors.sh"Bryce Harrington1-0/+0
This reverts commit 5c17bf1a33b8e76edeb23121342e0f163fe9d6ad. Script is sourced in the makefile, no need for +x.
2014-10-19pdf: fix compiler warningAdrian Johnson1-1/+1
2014-10-19CFF: Fix unaligned accessAdrian Johnson3-35/+58
Debian bug 712836 reported bus errors in cff subsetting when running on a sparc. This is because unlike truetype, all data in the compact font format is not aligned. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712836
2014-10-17Add execution bit for make-cairo-test-constructors.shBryce Harrington1-0/+0
This is referenced in the Makefile but not set as executable
2014-10-17Update mime type documentation.Adrian Johnson1-1/+27
2014-10-16RELEASING: Update tags push commandBryce Harrington1-1/+1
I couldn't get the documented command to do diddly. Running `git push --tags` achieved what I think was intended.
2014-10-13Start 1.14.1 developmentBryce Harrington1-1/+1
2014-10-13pattern: Restore dropped inclusion of cairoint.hBryce Harrington1-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.
2014-10-131.14.0 releaseBryce Harrington1-2/+2
2014-10-13NEWS: Flesh out docs for new APIsBryce Harrington2-3/+12
2014-10-13NEWS: Update with latest changes and finalize for releaseBryce Harrington1-5/+19
2014-10-12pdf: don't use '\' to split strings across multiple linesAdrian Johnson1-1/+1
The PDF interpreter in my printer does not handle this correctly. So instead we add the string delimiters '(' and ')' to each line.
2014-10-10image: Corrected extents calculationsBill Spitzak6-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>
2014-10-10xcb: Use image fallback for GOOD/BEST filtersBill Spitzak1-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>
2014-10-10xcb: Add switches for whether XRender supports GOOD/BEST filteringBill Spitzak2-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>
2014-10-10xlib: Use image fallback for GOOD/BEST filtersBill Spitzak1-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>
2014-10-10xlib: Add symbols to indicate if XRender supports GOOD/BEST filteringBill Spitzak1-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>
2014-10-10image: Move filter decision to _cairo_pattern_analyze_filterBill Spitzak2-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>
2014-10-09test: Update pixman downscaling 95 reference imagesBryce Harrington49-0/+0
The pixman downscaling "95" tests attempt to rescale a 96x96 pixmap to 95x95. Ideally the borders between color areas should be sharp, but for this use case we allow for 1 pixel of blur between the areas as acceptable. The choice of what color to use for this blurred region is not important, and in fact varies from backend to backend. The old reference images were generated by Krzysztof KosiƄski's downscaling algorithm. These new images are against the algorithms written by Bill Spitzak. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2014-10-09test: Add an update-refs.sh script to update reference imagesBryce Harrington1-0/+84
There are cases where the rendered output of a test can vary from backend to backend in ways which are visually acceptable. This is why we have reference images in the first place. In these cases, changes to the rendering logic can result in slight differences in the output that is also within acceptable visual limits. We see this in the pixman downscaling tests. This script is introduced as a way to more easily update the reference images after a renderer change. This script is intended to be expanded to handle updating of references for other tests as we identify similar issues. The intent is that this script then serves as a way to document these exceptional cases. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2014-10-09test: Fix error message to specify the executable that was missingBryce Harrington1-1/+1
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2014-10-09test: Fix conflation of different device scales in index.htmlChris Wilson1-1/+1
Currently testtable.js does not recognise the difference between running the same test with multiple scale factors and merges the results into one.
2014-10-09test: Teach check-preprocessor-syntax.sh about -inlines.hChris Wilson1-2/+2
2014-10-03Get make check back to a happy spotBryce Harrington2-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
2014-10-03Declare as private the new cairo_lines_compare_at_y symbolBryce Harrington1-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>
2014-10-03quartz: Check for quartz surface type before conversionBryce Harrington1-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>
2014-10-03quartz-image: Fix buildAndrea Canciani2-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>
2014-10-03quartz: Fix buildAndrea Canciani1-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>
2014-10-02test: Add whole flipped replaysChris Wilson10-0/+188
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>
2014-10-02image: Eliminate self-intersections for the pixman traps compositorChris Wilson1-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>