Commit graph

7616 commits

Author SHA1 Message Date
Chris Wilson
f851009ec7 [trace] Compile without lookup-symbol
And check compilation with --disable-symbol-lookup
2009-09-13 10:57:42 +01:00
Chris Wilson
6cb3ff9c19 [configure] --enable-symbol-lookup
There you go Joonas, I don't always ignore your suggestions! This is
simple patch to allow the user to disable symbol loops in case the
auto-detection fails on some obscure (perhaps OpenBSD) platform. Or in
case the user really wants to trim a few bytes from a library only used
during tracing!
2009-09-13 10:52:14 +01:00
Chris Wilson
556d064f4e [test] Typos in README from previous commit 2009-09-11 15:35:27 +01:00
Chris Wilson
43ecde2d22 [test] Add Debian packages for fonts
Mention which .deb provides the required fonts.
2009-09-11 15:15:22 +01:00
Chris Wilson
33be73dfb7 [xlib] Fix big-line.
Project lines that exceed the 16.16 limits onto the XFixedLine, as we know
that top/bottom must fit within the confines of the surface and so will be
less than 16 bits.

Sadly this is a run-on patch that also does:
1. Make FillTiled the default for new GCs.
2. Stores extend mode as opposed to repeat, and thereby cleaning up some
inconsistent code.
3. Remove the special casing for unbounded trapezoids, as it is redundant
with the polygon clipping.
4. Tidy the logic for deciding when to use the core protocol
(_categorize_composite_operation)
2009-09-11 14:59:58 +01:00
Chris Wilson
6960162c5e [xlib] Discard clip if larger than glyph extents
Implement cheap calculation of glyph extents to see whether we can discard
the clip region. This is effective around 50% of the time for firefox (and
makes the xtrace so much neater).
2009-09-11 14:56:17 +01:00
Chris Wilson
6e78409417 [test] Update big-line and remove XFAIL
Now that we use polygon clipping, output geometry should no longer exceed
the 2^16 limits imposed by pixman. For the image backend, we now use spans
for stroking and for the xlib backend we have to double check the range on
the output trapezoids. In short, cairo should pass this test.
2009-09-11 14:19:38 +01:00
Chris Wilson
b495e7eb2e [surface] Early return for (region IN white)
Fill a region using IN and a white source is a frequent reduction of a
complex clip (viz a path that covers the whole operation extents will be
reduced to a single rectangle), and we can simply discard the fill (as it
always has bounded semantics).
2009-09-10 19:25:14 +01:00
Chris Wilson
94aeae9b2e [clip] Simplify applying a box clip
If the clip path is a simple box, then for many operations it is entirely
representation by the alteration of extents and so we can skip a few steps
during reconstruction.
2009-09-10 19:11:36 +01:00
Chris Wilson
496e79b637 [xlib] Fix extraction of GC during XCloseDisplay()
Jeff Muizelaar reported a bug from his firefox builds that was causing a
double free during XCloseDisplay, and suggested it was related to
c0e01d9cd. Reviewing the cleanup, suggested that the cause may just be a
pair of missing parenthesis.
2009-09-10 17:36:46 +01:00
Chris Wilson
f34affaa1e [util] And reuse the same name repository name.
Completely confused by local caching of a broken cairo.modules by the
jhbuild client. ARGH!
2009-09-09 18:03:20 +01:00
Chris Wilson
e1774185d6 [util] And back to a unique repo name for cairo.modules
Gah, further experiments into the unknown and the unclear.
2009-09-09 17:52:10 +01:00
Chris Wilson
2905ebc99e [util] And restore the repository tag.
jbhuild requires a local definition.
2009-09-09 17:24:43 +01:00
Chris Wilson
4d7eb79d25 [util] Inherit the repository from xorg.modules
Experiment with inheriting the repository from xorg.module, in order to
avoid having two entries for the same server.
2009-09-09 17:12:14 +01:00
Chris Wilson
f5ee785144 [test] Disable the antialias testing for the vector surfaces.
Only the raster bckends obey the font anti-alias options.
2009-09-09 13:59:50 +01:00
Chris Wilson
abaef9bfbe [test] Compare a failure against the image output
If a backend fails in exactly the same way as the image, then we can
safely assume that the failure is systematic and not an error in the
backend, so change the result to XFAIL.
2009-09-09 13:57:06 +01:00
Chris Wilson
41fbea053a [test] Typo in ft-show-glyphs-positioning
Note to self: remember to sleep more often.
2009-09-09 12:19:51 +01:00
Chris Wilson
c61480a319 [test] An oversized twin test case.
A larger variant of the twin mixed antialiasing test.
2009-09-09 11:08:17 +01:00
Chris Wilson
610b311a97 [test] Variation of twin that intermixes antialiasing
Check that we are substituting the right glyph depth and changing masks
appropriately.
2009-09-09 09:53:45 +01:00
Chris Wilson
c218ff8cbe [test] SUBPIXEL_ANTIALIAS varation of twin
Force argb32 glyphs.
2009-09-09 09:53:25 +01:00
Chris Wilson
456484514f [test] Variation of twin with ANTIALIAS_GRAY
Force generation of a8 glyphs.
2009-09-09 09:38:18 +01:00
Chris Wilson
8555984b8e [test] Add ANTIALIAS_NONE variation of twin
I'm off hunting bugs. By using twin with ANTIALIAS_NONE we can construct
a1 glyph images independently of the native font system.
2009-09-09 09:29:42 +01:00
Chris Wilson
1820cb7fd6 [test] Check for errors during ft-show-glyphs-positioning
Do not blindly assume that we managed to construct a valid scaled-font
before attempting to dereference the FT_Face. Consider a machine with
no fonts which is substituting twin...
2009-09-09 09:12:54 +01:00
Chris Wilson
7fb0d5e209 [twin] Initialise all properties
Left a couple of uninitialised properties along the non-toy font
construction path.
2009-09-09 01:45:16 +01:00
Chris Wilson
34778a883a [configure] Typo in test
The have_dl clause was meant to have been removed from the requirements
test for cairo-script-interpreter. Instead we left the test broken.
2009-09-09 01:16:08 +01:00
Chris Wilson
4b221bd49a [spans] Correct offsets for trapezoids
Pass on the destination offset from composite_trapezoids() to
composite_polygon().
2009-09-08 19:02:04 +01:00
Chris Wilson
9389cb78a8 [build] Improve handling of missing test apparatus
Improve detection, reporting and disabling of test backends when we lack
the required libraries and utilities.
2009-09-08 17:51:33 +01:00
Chris Wilson
45759e5a0f [gl] Supply extents for acquire source image
I have no idea how we survived for so long without supplying the source
extents...
2009-09-08 09:19:53 +01:00
Chris Wilson
67d40e5c73 [xlib] Protect ourselves from liars that claim to have a 64k window
Found using webkit, who attempt to paint an width X page height window.
Please, please clip large windows to the visible area. Thanks.
2009-09-06 10:21:00 +01:00
Chris Wilson
310cebf194 [configure] Add option to disable trace.
Some environments may be broken beyond our capabilities to detect, or
maybe the user is just insane and doesn't want to build my nice shiny
cairo-trace. Whatever, give them the option to choose:

  $ ./configure --disable-trace
2009-09-05 15:21:50 +01:00
Chris Wilson
9b932d7cd7 [perf] Move the calibration to its own function
Improve code clarity and whatnot.
2009-09-05 08:46:39 +01:00
M Joonas Pihlaja
270b2f1be0 [perf] Add a fast-and-sloppy mode to cairo-perf.
A new -f option to cairo-perf reverts to a fast run
mode for quick performance overviews. The number of
milliseconds each iteration of a test is run for can
be overriden using the new CAIRO_PERF_ITERATION_MS
environment variable. The default remains 2000 ms/iter.
2009-09-05 05:50:57 +03:00
M Joonas Pihlaja
7f91c4953c [boilerplate] Support wildcard ? in CAIRO_TEST_TARGET{,_EXCLUDE}.
Useful for running tests only for a given content type.
2009-09-05 05:50:57 +03:00
M Joonas Pihlaja
b3bafbc5f9 [boilerplate] Support giving content in CAIRO_TEST_TARGET{,_EXCLUDE}.
Sometimes it's convenient to run the regression or performance tests
against a given target with a given content.  Now we accept an optional
content specifier as a suffix .<content> on a target name, where
<content> is rgb or rgba.
2009-09-05 05:50:56 +03:00
M Joonas Pihlaja
29432d3d32 [test] Reorder dash-infinite-loop to not hit a runaway allocation.
This test is annoying enough as it is what with it wedging the
test suite and all.  There's no reason why it should DOS the
running box as well by sitting in a loop allocating like mad.
2009-09-05 02:25:01 +03:00
M Joonas Pihlaja
20b0e7f954 [test] Add large-source-roi.ref.png to test/Makefile.am
Oops.. forgot to add it to the build files too
2009-09-04 23:54:21 +03:00
Chris Wilson
402a053948 [gl] compile fix.
Compiled fine during testing -- only I forgot I hadn't enable the gl surface.
2009-09-04 09:47:10 +01:00
Chris Wilson
b065303740 [xlib] Enable pad_reflect by default
If the XServer claims to support the required Render extension then send
it the operations. However for the cases where we know it does not work,
i.e. the current and previous generations (<=1.6) of Xorg servers, enable
the buggy_pad_reflect fallbacks.
2009-09-04 09:35:22 +01:00
Chris Wilson
634fdb4afd [test] Add unbounded variants of clip-{fill,stroke}
Add a couple of tests to exercise a bug that Joonas spotted that I had
introduced with the clip-reduction scheme - namely that I had
incorrectly removed the clip on unbounded operations.
2009-09-04 09:34:41 +01:00
Chris Wilson
de99f84188 [fallback] Only eliminate the clip if the operation is bounded
For unbounded operations we still need to pass along the clip in order to
correctly limit the extents of the operation.
2009-09-04 08:55:19 +01:00
Chris Wilson
0ffca06d7f [perf] Use milliseconds by default in cairo-perf-diff-files
Necessary when comparing performance reports from different machines (or
even at different CPU states).
2009-09-04 08:32:31 +01:00
Chris Wilson
00ca0780b8 [win32] Remove unused clone_similar()
The win32 backend handles surface sources directly and never calls
_cairo_pattern_acquire_surface() which is the only other possible user of
clone_similar().
2009-09-03 23:25:53 +01:00
Chris Wilson
535bcaa1a1 [mutex] Hook into pthread last
Check for native mutex types before hooking into pthread, as this
workarounds broken builds on mingw that confuse us by including the
pthread header file.
2009-09-03 20:12:41 +01:00
Chris Wilson
769f4a4f47 [gl] Allocate small number of rectangles on the stack
FillRectangle is most frequently used to fill an entire imagee with the
background colour, i.e. with just a single, or few, rectangle. Avoid
heap allocation for this common case by allocating enough space for 4
rectangles (vertices+colors) on the stack.
2009-09-03 20:12:41 +01:00
Chris Wilson
6ce200da9d [gl] Assert that the error is impossible.
As we created the image, it should not need coercing into a suitable
format and so we should be able to upload it without failure.
2009-09-03 20:12:40 +01:00
Chris Wilson
d3aeafb406 [gl] Remove reference to depth_stencil_tex
We no longer use a depth-stencil, so remove the vestigial reference.
2009-09-03 20:12:40 +01:00
M Joonas Pihlaja
316c1683ce [test] Fix the order of random points random-intersections-curves*.
The calls to uniform_random() to get the curve points were in
the function arguments, but argument order evaluation is compiler
implementation dependent.
2009-09-03 21:38:31 +03:00
M Joonas Pihlaja
9e45673e19 [image] Check for out of bounds image surface sizes in constructors.
The image surface code doesn't reliably work on images larger than
32767 in width or height.  This patch makes the image surface
constructors fail by returning a surface in the CAIRO_STATUS_INVALID_SIZE
state when given negative or too large dimensions so that client code
gets a prompt and correct error rather than flaky rendering on large
images.
2009-09-03 19:27:24 +03:00
M Joonas Pihlaja
12d0613210 [test] Allow tests to XFAIL by putting the cairo_t into an error state.
The test runner was extra strict about never letting a test put
the cairo_t into an error state, and never would it check for
the expectedness status of the failure.  This patch moves the
check for a test being an XFAIL above the check on the cairo_t's
final status.
2009-09-03 19:27:23 +03:00
Chris Wilson
a76c36f2ed [xlib] solid pictures should only be 1x1
Creating an widthxheight solid picture for using with
RenderCompositeTrapezoids defeats the optimization with the xserver that
checks for a solid alpha pattern. The checks it performs are for
CONTENT_ALPHA, Repeat, 1x1 and value == 0xff.
2009-09-03 14:29:20 +01:00