Commit graph

3297 commits

Author SHA1 Message Date
Carl Worth
40b6d8842e Remove radial-gradient test from XFAIL list
This test has not been failing since the fix in:

	772edc9133

So get rid of the '1 unexpected passes' complaint.
2007-03-14 15:06:36 -07:00
Behdad Esfahbod
e803e2e69b [cairo-pattern] Add a cache of two color stops to cairo_gradient_pattern_t
Most of gradients have only two color stops.  This avoids
calling malloc() for those cases.
2007-03-14 17:24:54 -04:00
Behdad Esfahbod
4514fdca1b [cairo-pattern] Grow color-stops array exponentially 2007-03-14 17:24:54 -04:00
Mathias Hasselmann
e878f2259b Include pixman/src in cairo-perf hash 2007-03-14 21:47:39 +01:00
Mathias Hasselmann
1a3f5df5ff Add index.html to .gitignore 2007-03-14 21:42:50 +01:00
Mathias Hasselmann
c40be43aef Transform the output of cairo-perf-diff into HTML 2007-03-14 21:41:40 +01:00
Mathias Hasselmann
f1dd48475a Improve CPU utilization when building cairo-perf 2007-03-14 21:18:09 +01:00
Behdad Esfahbod
a7595c1295 [Makefile.am] Do not distribute cairo-features.h, Ouch!
We were accidentally doing that by not marking it noinst.
Moreover, no need to mark it as BUILD_SOURCES, since it's
created by configure, not make.
2007-03-13 17:21:19 -04:00
Behdad Esfahbod
f3c8d82d6d [test] If backends are limited and all untested, pass the test
This is necessary to ensure that limiting backends using
CAIRO_TEST_TARGET does not increase the number of tests failing,
which is a desirable invariant.
2007-03-13 16:51:34 -04:00
Behdad Esfahbod
30b5f1baa8 [test] In pattern-getters test, log what went wrong 2007-03-13 16:50:10 -04:00
Behdad Esfahbod
9267cb0424 [cairo-pattern] Use _cairo_color_double_to_short() to fix color conversion 2007-03-13 16:49:42 -04:00
Behdad Esfahbod
60502ba348 [cairo-color] Add cairo-private _cairo_color_double_to_short() 2007-03-13 16:13:35 -04:00
Behdad Esfahbod
956fdfbb62 [cairo-pattern] Fix color conversion from short to double
We should divide by 65535.0, not 65536.0.
2007-03-13 06:30:11 -04:00
Behdad Esfahbod
2030490862 [cairo-pattern] Add XXX note 2007-03-13 06:20:21 -04:00
Behdad Esfahbod
deed0f4734 [polygon,spline,traps] Avoid free(NULL) 2007-03-13 06:09:09 -04:00
Behdad Esfahbod
b706bd9b38 [cairo-polygon] Add a cache of eight edges to cairo_polygon_t
Many, if not most, of polygons have very few edges.  This avoids
calling malloc() for those cases.
2007-03-13 06:07:03 -04:00
Behdad Esfahbod
d8165d5424 [cairo-spline] Fix typo in comment 2007-03-13 05:59:33 -04:00
Behdad Esfahbod
cca7e3fec3 [cairo_polygon_t] Change has_current_point from int to cairo_bool_t 2007-03-13 05:56:38 -04:00
Behdad Esfahbod
81e15a454b [cairo_polygon_t] Remove unused member 'closed' 2007-03-13 05:55:45 -04:00
Behdad Esfahbod
2bf4ce389d [cairo_polygon_t] Reorder struct members for clarity 2007-03-13 05:53:13 -04:00
Behdad Esfahbod
3ce84390de [cairo-polygon] Clean-up realloc algorithm for clarity 2007-03-13 05:51:39 -04:00
Behdad Esfahbod
6976ab1392 [cairo-slope] Make comparison stable if both vectors are zero 2007-03-13 05:14:20 -04:00
Behdad Esfahbod
9eee167210 [cairo-spline] Add a cache of eight points to cairo_spline_t
Most of the splines need not more than eight points.  This avoids
calling malloc() for those cases, and eight-points take only 64 bytes.
2007-03-13 05:14:20 -04:00
Behdad Esfahbod
1e64ecf075 [cairo-spline] Clean-up realloc algorithm for clarity 2007-03-13 05:14:20 -04:00
Behdad Esfahbod
cee687a33f [cairo_traps_t] Reorder struct members for clarity 2007-03-13 05:14:20 -04:00
Behdad Esfahbod
24aec99ffb [cairo-traps] Add a cache of one trapezoid to cairo_traps_t
Seems like half the time, we just need one trap.  This avoids
calling malloc() for those cases.
2007-03-13 05:14:19 -04:00
Behdad Esfahbod
4737416c6e [cairo-traps] Clean-up realloc algorithm for clarity 2007-03-13 05:14:19 -04:00
Behdad Esfahbod
a9d8cb3e8a [cairo-traps] Use INT32_MIN/MAX instead of INT16_MIN/MAX << 16 2007-03-13 05:14:19 -04:00
Behdad Esfahbod
5d28bf605f [test] Make pdiff if necessary 2007-03-13 05:14:19 -04:00
Behdad Esfahbod
e765ac745e [skiplist] Prefix symbols with _cairo 2007-03-13 05:14:19 -04:00
Behdad Esfahbod
cd78da36f6 [test-surfaces] Prefix public symbols with _cairo 2007-03-13 05:14:19 -04:00
Behdad Esfahbod
8997b3a023 [skiplist] Move static variable out of function
Part of my secrect plan to make cairo compilable with:

	#define static

Useful for some weird debugging purposes.
2007-03-13 05:14:19 -04:00
Behdad Esfahbod
d40126f5ab [cairo_t] Embed a gstate into cairo_t
So we don't have to malloc the first gstate.
2007-03-13 05:14:19 -04:00
Behdad Esfahbod
01f9ee39fe [cairo-clip] Make _cairo_clip_init tolerate NULL target
(needed for upcoming patches.)
2007-03-13 05:14:19 -04:00
Behdad Esfahbod
bc8987068d [cairo_t] Make path an array of size one
This is more natural since cr->path can be used as if it was a pointer.
This means, for example, if we move on to making it a pointer, most of
the code using it does not need any change.  So we get some level of
encapsulation of implementation details, if you prefer the terminology :).
2007-03-13 05:14:19 -04:00
Behdad Esfahbod
74e6a24e98 [Quartz] Don't include cairo-private.h 2007-03-13 05:14:19 -04:00
Behdad Esfahbod
6bc543a0eb [cairo_t] Move gstate pointer before cairo_path_fixed_t for better cache behavior 2007-03-13 05:14:18 -04:00
Behdad Esfahbod
85aff353ca [cairo-path-fixed] Fine-tune size of buffer
such that cairo_path_fixed_t fits in 512 bytes.
2007-03-13 05:14:18 -04:00
Behdad Esfahbod
1bd073a1a2 [cairo-path-fixed] Merge op and arg bufs
This means, we have to malloc only one buffer, not two.  Worst case
is that one always draws curves, which fills the arg (point) buffer
six times faster than op buffer.  But that's not a big deal since
each op takes 1 byte, while each point takes 8 bytes.  So op space
is cheap to spare, so to speak (about 10% memory waste at worst).
2007-03-13 05:14:18 -04:00
Behdad Esfahbod
5750d669af [cairo-path-fixed] Avoid malloc for small paths
We do this by including an initial op and arg buf in cairo_path_fixed_t,
so for small paths we don't have to alloc those buffers.

The way this is done is a bit unusual.  Specifically, using an array of
length one instead of a normal member:

-    cairo_path_op_buf_t *op_buf_head;
+    cairo_path_op_buf_t  op_buf_head[1];

Has the advantage that read-only use of the buffers does not need any
change as arrays act like pointers syntactically.  All manipulation code
however needs to be updates, which the patch supposed does.  Still, there
seems to be bugs remaining as cairo-perf quits with a Bad X Request error
with this patch.
2007-03-13 05:14:18 -04:00
Behdad Esfahbod
994dd1a134 [boilerplate] Prefer top_builddir to top_srcdir
This may fix some build problems the Ubuntu guys are experiencing
with out-of-tree builds.
2007-03-13 05:14:18 -04:00
Behdad Esfahbod
2894ed19a3 [directfb,os2] #error if the backend is not compiled in, like others do 2007-03-13 05:14:18 -04:00
Adrian Johnson
073d06d466 Fix incorrect file permission in previous commit 2007-03-13 18:45:38 +10:30
Adrian Johnson
a944f42b3d Fix buffer overflow warning 2007-03-13 18:35:59 +10:30
Carl Worth
0f78eb8ccf perf/README: Add notes on using cairo-perf-diff 2007-03-12 16:24:58 -07:00
Chris Wilson
14cab8b020 Correct an off-by-one in the reflection of the convolution index.
Currently the convolution code uses the formula 2*(N-1)-n to reflect the index
n when n is greater than or equal to N.
This is wrong as n=N -> 2*(N-1)-N = N-2 instead of N-1.

Furthermore when the image is small, e.g. at the highest levels of the
pyramid, this causes the code to index before the start of the array and
causes valgrind to issue a warning.
2007-03-12 14:48:11 -07:00
Chris Wilson
789aada06b Avoid the struct copy when source and destination are the same.
On some architectures, gcc will emit a memcpy for structure copies which will
produce a valgrind warning when the source and destination pointers are the
same. Workaround this issue by explicitly checking the source and destination
for inequality before doing the structure assignment.
2007-03-12 14:48:05 -07:00
Carl Worth
ef284a2d6b Fix a LOCK vs. UNLOCK typo, (yes, I'm that stupid).
Thanks to M.Drochner@fz-juelich.de for noticing the bug.

This fixes bug #10235:

	locking bug in cairo_ft_scaled_font_unlock_face()
	http://bugs.freedesktop.org/show_bug.cgi?id=10235
2007-03-09 13:36:03 -08:00
Emmanuel Pacaud
772edc9133 SVG: fix a radial gradient failure when using CAIRO_EXTEND_REFLECT.
Assume from the beginning we're using a circle with a radius equal to
2 * ( r1 - r0 ) when emulating CAIRO_EXTEND_REFLECT.
2007-03-08 21:32:59 +01:00
Behdad Esfahbod
c07867c545 [glitz] Mark some constant static structures as const 2007-03-07 16:02:09 -05:00