Commit graph

11056 commits

Author SHA1 Message Date
Bryce Harrington
0f46fc8dc1 configure.ac: Quell warnings about AM_PROG_AR when using automake 1.12
Without this, autogen.sh issues warnings like:

  /usr/share/automake-1.14/am/ltlibrary.am: warning: 'libcairoboilerplate_cxx.la': linking libtool libraries using a non-POSIX
  /usr/share/automake-1.14/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
  boilerplate/Makefile.am:18:   while processing Libtool library 'libcairoboilerplate_cxx.la'

AM_PROG_AR was introduced in automake 1.11.2.  As per the docs for
AM_PROG_AR, it is supposed to be included when the archiver ('ar') is
used, but prior to automake 1.12 the warning was only shown iff
-Wextra-portability was specified.  automake 1.12 introduced a change
that includes -Wextra-portability when -Wall is specified.

For further discussion of the issue, see:

  http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11401
  http://lists.gnu.org/archive/html/automake/2012-05/msg00014.html

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2014-07-11 18:34:43 -07:00
Behdad Esfahbod
312553af29 [trace] Don't print FC_CHARSET, FC_LANG, and FC_CAPABILITY
There are many more that can go, but these take the most bytes.
FC_CHARSET needs to go specially because I recently changed
its format in fontconfig.  Ouch!
2014-07-11 11:07:25 -04:00
Behdad Esfahbod
4cb220773d chmod a+x cairo-trace 2014-07-11 11:07:25 -04:00
Ravi Nanjundappa
e279709bf3 skia : Add Debug support for skia backend
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>
2014-07-10 12:08:01 -07:00
Ravi Nanjundappa
8a605472d2 .gitignore: Ignore the generated profile data files from callgrind tool in test/
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-07-09 16:51:22 -07:00
Jeff Muizelaar
30cb23d3b6 clang-cl: Use size of the pointer explicitly
This works around http://llvm.org/PR20216.
2014-07-09 16:35:30 -04:00
Bryce Harrington
28c3b92fb4 .gitignore: Ignore two generated files in build/
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2014-07-08 17:47:23 -07:00
Ravi Nanjundappa
7bd68b5799 skia: update the source to build with the latest skia
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>
2014-07-08 11:09:04 -07:00
Ravi Nanjundappa
be62b12211 xcb: make use of _cairo_surface_is_xcb to check for surface type
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>
2014-07-07 03:53:13 -07:00
Jeff Muizelaar
550385fb00 Don't use __FUNCTION__ as a string literal
clang-cl doesn't support this and we don't gain much
from using it.
2014-06-30 14:17:18 -04:00
Ravi Nanjundappa
f574fec8d2 src : Fix warn_unused_result warnings from gcc
Fix 'unused-result' warning messages by
- replacing cairo_private to cairo_private_no_warn in the
  declaration of the cairo private apis '_cairo_surface_unmap_image',
  '_cairo_polygon_add_line', '_cairo_polygon_add_external_edge' and
  '_cairo_polygon_add_contour'
- removing cairo_warn for 'render_rows' member function pointer in
  'struct _cairo_span_renderer'

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
2014-06-05 16:12:30 -07:00
Eric Le Bihan
5741a7f2ca test: fix build of any2ppm if fork not available
The test program any2ppm can run as daemon. This feature can be disabled
at compile time, if the required headers are not present. However the
support for fork() is not checked.

This patch fixes this issue.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
2014-06-05 16:09:45 -07:00
Uli Schlachter
3d94269bd4 Revert "image: Use convolution filters for sample reconstruction when downscaling"
This reverts commit fb57ea13e0.

When running cairo-test-suite with the parameter "-a", it also runs each test
with a non-zero device-offset and device-scaling. The above commit influenced
the device-scaling results badly. E.g. some test results ended up with a black
border at the top-most and left-most row that looked like there was an offset of
"0.5" in drawing the image and thus pixels outside of the image were sampled.

This can be seen by the influence that this revert has on the results from
running CAIRO_TEST_TARGET=image ./cairo-test-suite -a:

Before: 31 Passed, 489 Failed [1 crashed, 8 expected], 31 Skipped
After: 225 Passed, 295 Failed [1 crashed, 8 expected], 31 Skipped

Most of the failures that disappeared are from the device-scaling tests.

With such disastrous results on the test suite, this cannot really be usable for
real-world applications.

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2014-06-05 13:16:24 -07:00
jimmyfrasche
2d89cbb30e Add more info to cairo_surface_set_mime_data docs.
Explains how to use cairo_surface_set_mime_data so that the image always
gets used even if the MIME data cannot be.

Signed-off-by: jimmyfrasche <soapboxcicero@gmail.com>
2014-06-05 13:14:11 -07:00
Ravi Nanjundappa
ead5c7909f vg: Use EGL_NONE and GLX_NONE in place of None
Use EGL_NONE in EGL section and GLX_NONE in GLX section
instead of None in cairo-boilerplate-vg.c

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55805
2014-05-19 17:37:38 -07:00
Ravi Nanjundappa
d1453c512c test : Maintain consistency in the usage of xcalloc
xcalloc is a wrapper for calloc. If it can't allocate memory then it
terminates the program. The current changes replace the usages of calloc
by xcalloc in tests.

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
2014-05-16 11:56:27 -07:00
Ravi Nanjundappa
69e10bc8b5 glx: Use GLX_NONE in place of None
Use "GLX_NONE" in rgb and rgba attributes instead of
"None" in cairo-boilerplate-glx.c

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-05-16 11:54:43 -07:00
Sylvestre Ledru
247cfaaa25 Fix some memory leaks found by scan-build, the LLVM/Clang static analyzer
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2014-05-16 11:11:34 -07:00
Sylvestre Ledru
5e7b724dd3 Remove some potential double free
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2014-05-16 11:11:30 -07:00
jimmyfrasche
85b05e84ac Pattern document clarification
Replaces documentation of the form "range 0 to 1 less than the number"
with "ranges from 0 to n-1 where n is the number", which is idiomatic
mathematical writing and less ambiguous.

Signed-off-by: jimmyfrasche <soapboxcicero@gmail.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-05-12 10:19:33 -07:00
Ravi Nanjundappa
55608e4fd6 boilerplate: Maintain consistency in the usage of switch cases
Some of the switch cases used in boilerplate are not consistent
across other source files in the same module. This patch fixes the
consistency issues of switch case usage in the boilerplate module.

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2014-05-06 10:22:43 -07:00
Bryce Harrington
18b3cce2f5 Fix segfault in firefox when scrolling on certain pages
Bug discovered by thorsten <fly_a320@gmx.de>

Patch from Chris Wilson <chris@chris-wilson.co.uk>
2014-05-06 10:18:19 -07:00
Sylvestre Ledru
da9ef97372 Remove some useless declarations found by scan-build, the LLVM/clang static analyzer
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-05-06 10:14:53 -07:00
Ravi Nanjundappa
52b137bc3e test and util: maintain consistency in the usage of ARRAY_LENGTH macro
ARRAY_LENGTH macro is used in perf's cairo-perf.h, src's cairoint.h,
test's cairo-test.h and in some internal header files of util's
directory.So to maintain consistency ARRAY_SIZE is replaced with
ARRAY_LENGTH macro.

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-04-30 13:01:35 -07:00
Ravi Nanjundappa
0e0004a971 perf: Refactor some macros to cairo-perf.h
This commit covers one of the left out modifications from
"commit cd11a4ff0421fd293279b202be800550890574bb" by Bryce.
It removes the duplicate macro definition in cairo-perf-diff-files.c
which by default includes the cairo-perf.h having MAX macro defnition.

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
2014-04-22 09:51:45 -07:00
Bryce Harrington
2d95f803b1 NEWS: Add bug links and reword feature and bug descriptions 2014-04-18 12:33:45 -07:00
Bryce Harrington
cd11a4ff04 perf: Refactor some common macros to cairo-perf.h
These macros are standard in src's cairoint.h and test's cairo-test.h
internal header files, so for consistency do the same thing with perf's
cairo-perf.h.

Reviewed-by: Uli Schlachter <psychon@znc.in>
2014-04-18 10:09:10 -07:00
Uli Schlachter
3e22a8580a pthread-same-source: Refresh reference images
These reference images are generated by the new GENERATE_REFERENCE mode that the
previous commit introduced.

I have no idea what the "base" images. From my reading of the code in
boilerplate/, these images will be used by the test-XXX targets. However, these
seem to generate the same result than e.g. the image backend. Thus, I deleted
these files.

There is still pthread-same-source.quartz.xfail.png. This file was created in
commit b6e16b8d and touched in commit 5a1e590b1. No idea if this is still valid
and since I don't have a Mac, I won't touch it.

The test is still broken on the following backends (out of the backends I have
compiled in). This mostly seems to be differences in image scaling, but I
couldn't figure out an easy way to tell the test suite that the new results are
correct.

test-paginated, ps2, ps3, xcb, xcb-window, xcb-window&, xcb-fallback, xlib,
xlib-window, xlib-fallback, recording

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-04-17 11:32:56 +02:00
Uli Schlachter
ddd344fb0f pthread-same-source: Add ref image generation
When the new GENERATE_REFERENCE symbol is defined to 1, no threads are involved
at all. In this case, all operations are done sequentially by the main thread.

Thus, in this mode no thread issues can occur and the result must be usable as
reference images.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-04-17 11:32:49 +02:00
Bryce W. Harrington
457597e2dc NEWS: Summarize recent changes
This updates NEWS with items shown by `git log --stat 1.12.8..`
Hopefully I haven't misrepresented any of the work done.  For sake of
brevity where there were several changes in one area, I've given a
single general entry to summarize those changes.  The division between
features and bug fixes is quite rough.
2014-04-16 17:27:50 -07:00
Uli Schlachter
bb17403622 mesh-rasterize: Fix number of iterations
Commit 44a09f462c fixed a compiler warning, but changed the result of this code.
This is because the old 'for' loop did one more iteration than the new 'while'
loop. Fix this by incrementing the loop counter once before the loop.

Fixes: mesh-pattern mesh-pattern-accuracy mesh-pattern-conical
mesh-pattern-control-points mesh-pattern-fold mesh-pattern-overlap
mesh-pattern-transformed record-mesh

Signed-off-by: Uli Schlachter <psychon@znc.in>
Tested-by: Bryce Harrington <b.harrington@samsung.com>
2014-03-21 14:10:19 +01:00
Uli Schlachter
372c8c314a mask compositor: Set a check_composite method
Commit 503b6b9e2e added a check_composite method to the mask compositor, but
only added it to one of the existing implementations. This commit fixes that.

In cairo-image-compositor.c, there is already a check_composite method which
just returns success for the traps compositor. This commit makes the mask
compositor use that one.

I don't want to say much about cairo-image-mask-compositor.c except that I
wondered why this file and the file above both define a non-static function
called _cairo_image_mask_compositor_get(). In my opinion, that file should just
be deleted, since it confuses e.g. ctags, but I'll let someone else clean this
up.

Fixes 493 crashes in the test suite for the test-mask target.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Tested-by: Bryce Harrington <b.harrington@samsung.com>
2014-03-21 14:09:37 +01:00
Uli Schlachter
bc05dbccd7 Fix warnings from check-doc-syntax.sh
$ ./check-doc-syntax.sh
Checking documentation for incorrect syntax
./cairo-types-private.h (148): WARNING: cairo_hash_entry_t: missing 'Since' field (is it a private type?)
./cairo-types-private.h (161): WARNING: cairo_hash_entry_t: not found
./cairo-types-private.h (175): WARNING: cairo_lcd_filter_t: missing 'Since' field (is it a private type?)
./cairo-cache-private.h (85): WARNING: cairo_cache_entry_t: missing 'Since' field (is it a private type?)
./cairo-region.c (857): WARNING: cairo_region_overlap_t: not found
./cairo-raster-source-pattern.c (62): WARNING: SECTION:cairo-raster-source 'Since' field in non-public element

The warnings about missing 'Since' fields are fixed by changing the
documentation comment so that the script can see that these are private types.

The documentation for cairo_region_overlap_t gets moved to cairo.h, just like
e.g. the documentation for cairo_status_t.

The 'Since' field from the SECTION:cairo-raster-source is removed, because this
kind of field is needed on the individual functions and structs, not on the
section.

Thanks to Bryce Harrington for bringing this up!

Signed-off-by: Uli Schlachter <psychon@znc.in>
Tested-by: Bryce Harrington <b.harrington@samsung.com>
2014-03-13 17:12:43 -07:00
Bryce Harrington
0c18991053 skia: Add section definitions and code docs for skia backend
This fixes several distcheck errors regarding missing code docs.

The skia backend was added in commit d7faec02, which was included in the
1.10 release.

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2014-03-13 17:12:37 -07:00
Bryce Harrington
0eb686d545 Document that libglib2.0-doc is needed to avoid some xref warnings
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2014-03-13 15:13:52 -07:00
Bryce Harrington
8d0abb4a94 surface: Make parameter naming consistent between header and impl
This fixes this set of distcheck errors generating docs:

  src/cairo-surface.c:1668: warning: Parameter described in source code
  comment block but does not exist. FUNCTION:
  cairo_surface_set_device_scale Parameter: sx.

  src/cairo-surface.c:1668: warning: Parameter described in source code
  comment block but does not exist. FUNCTION:
  cairo_surface_set_device_scale Parameter: sy.

  src/cairo-surface.c:1668: warning: Parameter description for
  cairo_surface_set_device_scale::x_scale is missing in source code
  comment block.

  src/cairo-surface.c:1668: warning: Parameter description for
  cairo_surface_set_device_scale::y_scale is missing in source code
  comment block.

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2014-03-13 15:13:34 -07:00
Bryce Harrington
4450af4f03 Mark recently added _cairo_output_stream_print_matrix private symbol
This fixes a distcheck error about a local PLT entry.

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2014-03-13 15:13:04 -07:00
Bryce Harrington
ae954ae3ea doc: Drop a couple quartz routines which distcheck claims don't exist
These routines actually do exist in the source code, and have proper
documentation, so I'm not sure why distcheck dislikes them, but it's
happier without these listed.

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2014-03-13 15:12:58 -07:00
Bryce Harrington
f4a1a75078 doc: Add missing sections and symbols for public docs
This adds a number of items to the documentation for which code docs
exist, and also adds sections for cairo-skia and cairo-surface-observer.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48784

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2014-03-13 15:12:50 -07:00
Uli Schlachter
ed175b2a2b clip: Fix handling of special all-clipped cairo_clip_t
_cairo_clip_intersect_box() wasn't checking if it was called with the special,
read-only all-clipped clip and thus could have ended up writing to read-only
memory.

References: https://bugs.freedesktop.org/show_bug.cgi?id=75819
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-06 09:51:56 +01:00
Chris Wilson
3b261bea7d clip: Do not modify the special all-clipped cairo_clip_t
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75819
2014-03-06 08:35:20 +00:00
Bryce Harrington
42fdfa812e gitignore: Ignore generated tmpl dir in public docs 2014-03-05 12:50:36 -08:00
Behdad Esfahbod
f88bd92e8b Revert "[ft] Fix memory bug in copying bitmaps"
This reverts commit a0f556f37f.

The change was clearly wrong now that I read.  I was probably
tricked by what was fixed in the follow-up commit
e738079302.
2014-03-05 01:13:59 -08:00
Koji Egashira
5c9fdcb4aa image: Add NULL checks for return value of _pixman_image_for_color()
This fixes crash in pixman_image_composite32().

Originally fixed by Yoshitaro Makise.

Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2014-03-03 17:21:37 -08:00
Benjamin Otte
6a03ae5859 xlib: Fix typo in documentation 2014-03-03 01:16:25 +01:00
Bryce Harrington
f1709c298c Correct spelling of "tessellator" throughout code
Based on patch suggested by Homer Hsing

Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=50411
2014-02-26 18:55:25 -08:00
Bryce Harrington
273210683f Add comment to explain _cairo_edge_compute_intersection_*
Patch by Homer Hsing

Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=50412
2014-02-26 18:44:46 -08:00
Bryce Harrington
e555dfc717 Add explanation to _cairo_surface_create_in_error
Patch by Homer Hsing

Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=50413
2014-02-26 18:42:41 -08:00
Bryce Harrington
be206ddf20 Add explanation to enum _cairo_int_status
Patch based on suggestion by Homer Hsing

Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=50416
2014-02-26 18:40:12 -08:00
Bryce Harrington
19b31bbe70 image: Fix bad HTML generation in code docs for cairo-format-stride-for-width
Patch from Simon Kågedal Reimer

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63257
2014-02-26 18:36:15 -08:00