Commit graph

8582 commits

Author SHA1 Message Date
Chris Wilson
16364768d7 test/halo: Transformation seems key to the bug... 2010-06-17 08:55:19 +01:00
Andrea Canciani
cb28e0bfeb test: correct options in getopt call
'k' was missing and 't' was present but unhandled. Options have been
reordered according to the "USAGE" ordering.
2010-06-17 08:42:39 +02:00
Andrea Canciani
3cd0755932 correct rounding computation
cairo_fixed_integer_round[_down] were adding an unsigned mask value
before shifting its result, causing the shift to be computed as
logical (unsigned) right shift, thus producing incorrect values for
negative inputs. Making the mask value signed fixes this issue.

Bug report by cu:
http://lists.cairographics.org/archives/cairo/2010-June/020115.html
2010-06-16 22:59:46 +02:00
Chris Wilson
8689d75caa test/halo: Transformation seems key to the bug...
Only it is actually transformation of the result that is required in
order to magnify the effect to a detectable level.
2010-06-16 15:40:42 +01:00
Chris Wilson
71936a1f41 test/aliasing: Add a few more colour combinations.
In particular, compare red against its inverse, cyan. Etc.
2010-06-15 21:36:15 +01:00
Chris Wilson
e2220a1f3a configure: Try an alternate name for system glew. 2010-06-15 11:45:54 +01:00
Chris Wilson
25ec0c1e9b build: Enable system GLEW on non-UNIX platforms 2010-06-15 10:59:01 +01:00
Chris Wilson
5262444663 glew: Define NULL 2010-06-15 10:40:36 +01:00
Chris Wilson
56d06b088b test: Add an aliasing test case.
Just a simple test in drawing neighbouring edges and looking for the
effects of aliasing.
2010-06-14 22:58:38 +01:00
Chris Wilson
4b39f02bf7 test: Add halo
halo uses text_path + stroke + (fill | show_text)  to generate a "halo"
around the string. This is to try to replicate a bug described by Ian
Britten in the PDF backend where the rendering of the show_text looked
distorted compared to the stroke.
2010-06-14 20:40:56 +01:00
Chris Wilson
072a200ec5 build: Add wgl to Makefile.sources and regenerate features. 2010-06-14 16:05:14 +01:00
Dmitri Vorobiev
4a0bd91ff7 scaled-font: fine-tune caching
This patch implements the ideas outlined by Behdad Esfahbod in the following
mailing list message:

http://lists.cairographics.org/archives/cairo/2010-June/020065.html

Specifically, two things have been adjusted. First, the size of the look-up
table was reduced to 64. Second, cache codepath is now bypassed for strings
that are shorter than 16, not only for one-character strings. This allowed
us to reduce the LUT initialization overhead while still retaining the
advantage of caching for common-case string sizes.

We have experimented with different LUT sizes, and it came out that the size
of 64 is the best one in view of speed, at least for our language-neutral
benchmark, which generated random strings of printable ASCII characters.

Below is a table presenting benchmark results for different values of LUT
size:

===============================================================================
 Benchmark		| [1]	| [2]	| [3]	| [4]	| [5]	| [6]	| [7]
===============================================================================
8px text, 1 chars	| 0.41	| 0.41	| 0	| 0.41	| 0	| 0.41	| 0
8px text, 10 chars	| 2.13	| 2.21	| 3.76	| 2.19	| 2.82	| 2.09	| -1.88
8px text, 20 chars	| 2.97	| 3.04	| 2.36	| 3.01	| 1.35	| 2.98	| 0.34
12px text, 1 chars	| 0.94	| 0.94	| 0	| 0.95	| 1.06	| 0.94	| 0
12px text, 10 chars	| 4.73	| 4.89	| 3.38	| 4.9	| 3.59	| 4.82	| 1.9
12px text, 20 chars	| 6.32	| 6.42	| 1.58	| 6.46	| 2.22	| 6.32	| 0
16px text, 1 chars	| 1.75	| 1.76	| 0.57	| 1.77	| 1.14	| 1.76	| 0.57
16px text, 10 chars	| 8.13	| 8.45	| 3.94	| 8.43	| 3.69	| 8.44	| 3.81
16px text, 20 chars	| 10.41	| 10.69	| 2.69	| 10.64	| 2.21	| 10.65	| 2.31
24px text, 1 chars	| 3.3	| 3.3	| 0	| 3.32	| 0.61	| 3.3	| 0
24px text, 10 chars	| 14.68	| 14.97	| 1.98	| 14.97	| 1.98	| 14.87	| 1.29
24px text, 20 chars	| 17.93	| 18.01	| 0.45	| 18.06	| 0.73	| 17.81	| -0.67
96px text, 1 chars	| 23.65	| 23.38	| -1.14	| 23.74	| 0.38	| 23.65	| 0
96px text, 5 chars	| 50.52	| 51.34	| 1.62	| 51.48	| 1.9	| 51.41	| 1.76
96px text, 10 chars	| 57.5	| 58.11	| 1.06	| 58.27	| 1.34	| 58.04	| 0.94
===============================================================================

[1]: Git head, Mpix/s
[2]: {GLYPH_LUT_SIZE = 32, CACHING_THRESHOLD = 16}
[3]: Gain of {32, 16} w.r.t. Git head
[4]: {GLYPH_LUT_SIZE = 64, CACHING_THRESHOLD = 16}
[5]: Gain of {64, 16} w.r.t. Git head
[6]: {GLYPH_LUT_SIZE = 128, CACHING_THRESHOLD = 16}
[7]: Gain of {128, 16} w.r.t. Git head

The benchmark itself can be found from this mailing list message:

http://lists.cairographics.org/archives/cairo/2010-June/020064.html
2010-06-14 15:33:51 +01:00
Zoxc
505a0456d2 gl: Added WGL context and surface. 2010-06-14 12:46:26 +01:00
Zoxc
fd6c38b9e0 win32: Fixed compile errors in Windows backend. 2010-06-14 12:44:20 +01:00
Chris Wilson
5f10139cd9 NEWS: A couple more tweaks
I only spotted these in the release announcement.
2010-06-13 12:33:10 +01:00
Chris Wilson
4932aaa317 version: 1.9.9
Post-snapshot bump.
2010-06-13 12:02:53 +01:00
Chris Wilson
3a20b10cd0 version: 1.9.8
Snapshot time!
2010-06-13 11:40:40 +01:00
Andrea Canciani
b612a23086 test: update quartz ref images in makefile 2010-06-13 12:30:11 +02:00
Chris Wilson
0693af2328 test: Move all output below test/output/
make distcheck complains of remanents being left under test/ after a
clean, notably the files used to check the capabilities of a similar
surface and the fallback-resolution output.
2010-06-13 10:25:49 +01:00
Chris Wilson
ffc3a39c95 NEWS: Minor tweaks. 2010-06-13 10:25:49 +01:00
Andrea Canciani
b6e16b8d29 test: quartz ref image refresh 2010-06-13 10:39:36 +02:00
Chris Wilson
0d5a15f238 check: Disable running cairo-perf-micro
Since this takes days to run now and should not find any bugs that are
not covered by the test-suite it seems like a pointless exercise.
Especially as I am trying to make a release!
2010-06-12 20:02:39 +01:00
Chris Wilson
e9fb39daee NEWS: take two. 2010-06-12 19:40:42 +01:00
Chris Wilson
62899e5e23 NEWS: Boring stub for 1.9.10. 2010-06-12 18:51:31 +01:00
Chris Wilson
fc372b1d9d test: Missing ref images 2010-06-12 16:51:22 +01:00
Chris Wilson
8737bc8b17 gl: start returning the failure status aftern an invalid GL op. 2010-06-12 16:49:46 +01:00
Chris Wilson
5b2f90bf53 test: Forgotten ref image. 2010-06-12 16:49:11 +01:00
Chris Wilson
cdd6f11716 test: Record the expected failure mode for partial-coverage-intersecting-quads
As the diagonals of the quad intersect below the limits of Cairo's fixed
point, we fail to take heed of the intersection.
2010-06-12 15:46:50 +01:00
Chris Wilson
3d72b4aa70 test/coverage: The comment was still wrong.
Writing comments is hard. I give in.
2010-06-12 15:34:07 +01:00
Andrea Canciani
e6d1b3a8ce test: update font family name
Update the name of the test font family to DejaVu, so that backends
unable to rely on fontconfig to match font names can find the correct
font anyway.
2010-06-12 16:30:56 +02:00
Andrea Canciani
3cb882d01b test: make test font family a define
In order to make it easier to change the test font family, add it
as a define in the global header and always reference the macro in
the tests.
2010-06-12 16:30:56 +02:00
Chris Wilson
b1e4df928f test/coverage: Refine comments
Joonas didn't like me putting incorrect labels in my comments. Said they
were misleading and worse than useless. Harsh.
2010-06-12 15:28:28 +01:00
Chris Wilson
968374b633 test/coverage: Add a comment describing the column_triangle geometry() 2010-06-12 15:14:17 +01:00
Chris Wilson
299263f8c9 test: Disable tests that are too slow to run by default.
Introduce a slow mode [-s] to the runner, and add "slow" to the
requirements for the very long running tests like the coverage stress
tests.
2010-06-12 14:06:06 +01:00
Chris Wilson
53139261c7 test: Use exact matching on test names by default.
Specifying individual tests to run is more common than using a group
chosen from a keyword, so change the default matching mode and introduce
'-k' to select by keyword.
2010-06-12 14:06:06 +01:00
Chris Wilson
97288b0859 test: More minute geometry exercised by partial-coverage.
Moving beyond the capabilities of cairo...
2010-06-12 14:06:06 +01:00
Chris Wilson
4e3ef57bc8 test: More coverage coverage.
A couple of different shapes that aim to test the tessellation side of
the rasterisers more... And worryingly there does seem to be an
unexpected systematic error.
2010-06-12 13:30:24 +01:00
Chris Wilson
9b7cc7641b cairo: Create error objects for cairo_t
Perform an early check for error status and prevent creation of a full
object. This means that we do not pass down error objects to the
initialisation routines and so can survive without paranoia inside the
library. It also has brings consistency that like the other
constructors, no object is created in error and we can skip the
cairo_destroy() if we choose (and we don't waste one of the precious
zero-alloc context slots.

Fixes crash in test/a8-mask introduced by 1a544361e8.
2010-06-12 10:41:09 +01:00
Chris Wilson
9b6617a3b3 image: Apply component alpha to composite masks.
If we need to pattern requires component alpha, then we must take a
copy of the image and enable component alpha for pixman.

Fixes test/text-antialias-subpixel on xlib-fallback -- i.e. we will
finally render subpixel antialiased text on ancient XServers.
2010-06-11 22:04:14 +01:00
Chris Wilson
7440fc07f7 test: xlib ref image refresh 2010-06-11 21:29:38 +01:00
Chris Wilson
a049889c64 pattern: Remove incorrect optimisations from _cairo_pattern_aquire_surface()
Safe reduction of patterns is performed in gstate, so not only are the
extra checks in _cairo_pattern_acquire_surface redundant there are also
unsafe. Simply remove them.

Fixes test/radial-gradient-extend [xlib-fallback]
2010-06-11 21:26:26 +01:00
Chris Wilson
00bc1d1578 pattern: Remove extraordinary _cairo_pattern_fini_snapshot().
Miraculously the circular references from self-copy have disappeared and
the forced finish within _cairo_pattern_fini_snapshot() now quite
explosive. By replacing them with an ordinary _cairo_pattern_fini() the
crash from test/smask-image-mask disappear along and valgrind remains
happy.

Fixes test/smask-image-mask and similar.
2010-06-11 21:08:06 +01:00
Chris Wilson
1098e203dc test: pdf ref image refresh 2010-06-11 18:07:28 +01:00
Chris Wilson
1c91d019c5 test: ps ref image refresh.
Update to gs-8.71 and some additional reference images for the new tests.
2010-06-11 17:48:36 +01:00
Chris Wilson
1a544361e8 gstate: Update cached matrix state after device transform changes on the target
Commit 8d67186cb2 caches whether the device
transform is identity on context creation. However, the api is quite lax
and allows the user to modify the device transform *after* he has
started to use the surface in a context, as apparently WebKit does.
Since this is not the only instance where we may need to invalidate
caches if the user modifies state, introduce a simple mechanism for
hooking into notifications of property changes.

Fixes test/clip-device-offset.
2010-06-11 16:08:17 +01:00
Chris Wilson
f74b11415a test: Use a group to render PDF correctly using poppler.
In order to support blend modes, we need to use a clear background
whilst rendering the PDF, which inspired the use of DEST_OVER to avoid
having to render to an intermediate surface. However, the adjunct of
using subpixel text means that we cannot simply using the alpha channel
as the sole mask and so need to render to an intermediate and paint it
over an opaque background.
2010-06-11 14:12:23 +01:00
Chris Wilson
7f227ec8d3 Revert "test/pdf2png: Don't use DEST_OVER as poppler starts using subpixel text."
This reverts commit 506b2ebe71.

We have conflicting requirements here. In order to support extended
blend modes correctly we need to use DEST_OVER, at the expense of
supporting subpixel text. More thought required.
2010-06-11 12:54:15 +01:00
Chris Wilson
c761e0c5bb test: Restrict the coverage tests to raster targets.
Typo inside the requirements failed to prevent the tests running on the
vector backends.
2010-06-11 12:40:36 +01:00
Chris Wilson
b49c944fe4 test: Add a convenience script to disable the screensaver when testing
If the screensaver activates, it can cause failures when attempting to
render into an xlib window, so inhibit if we know how.
2010-06-11 12:38:17 +01:00
Chris Wilson
4e4724d48c gl: make check insists "cairoint.h" is first. 2010-06-11 12:19:56 +01:00