Commit graph

7593 commits

Author SHA1 Message Date
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
Chris Wilson
df067be863 [polygon] Compute the limit of the limits slightly more efficiently
Initialize the bbox to the first limit, as frequently there will only be a
single (or at least a small number) limit.
2009-09-03 10:07:34 +01:00
Chris Wilson
a1bac73f24 [boilerplate] Handle errors whilst creating GL surface 2009-09-03 09:22:23 +01:00
Chris Wilson
f1d284f997 [polygon] Fix discard with non-banded disjoint clip boxes
The early discard checked if the line was below the last clip-box, or if
above the first. However, the clip-boxes are only sorted on by the bottom
(not the strict XY-banded sort of the regions) and so this was erroneously
discarding lines.
2009-09-03 01:00:59 +01:00
Chris Wilson
a6dfdeec82 [test] Add clip-disjoint
Soeren found another bug (thanks Soeren!) in the clipping code - as
reproduced by this test case.
2009-09-03 00:59:21 +01:00
Chris Wilson
ff6bc1e132 [script] Always create a fallback font
In order to get a baseline for win32 performance testing, always create a
font so that the trace can be replayed. Not ideal, but I feel this the
pragmatic solution for judging the performance differentials before I can
work out a better solution for loading typ42 fonts.
2009-09-02 21:22:33 +01:00
Chris Wilson
fcbb288e7c [script] Attempt to select a font if ! CAIRO_HAS_FT_FONT
In order to enable replay of traces on machines that do not use FreeType
as the native font system, we need to convert a type42 font into something
similar. Currently the fallback is just to select a font with the same
name - this ignores weight and slant, and many other details.
2009-09-02 21:02:18 +01:00
Chris Wilson
2c03dfa0b4 [boilerplate/test] Use numerical equality not string equality
test == != -eq
2009-09-02 10:09:50 +01:00
M Joonas Pihlaja
f5df38ca5e [build] Fix typos in prototype warnings.
The -Wstrict-prototypes and -Wmissing-prototypes warnings
weren't actually in use due to typos.
2009-09-02 06:40:35 +03:00
M Joonas Pihlaja
c086b40a93 [build] Hush the Solaris compiler about enum abuse.
Sun Studio 12 doesn't like it when we mix our
enum values and types.  We do that a lot on purpose
so the warnings from compiles were very verbose.
2009-09-02 06:38:15 +03:00
M Joonas Pihlaja
f081a5ff55 [build] Refine the -Wno-attribute test to check our use cases.
We don't actually check that -Wno-attribute does what
we think it does.  On clang it doesn't since it happily
seems to recognize but ignore the attribute.

This patch factors out a silent version of CAIRO_CC_TRY_FLAG
which accepts an optional program argument and actually tests
that the compiler doesn't produce any warning messages.  It
is then used to check that -Wno-attribute doesn't complain
when the __warn_unused_result__ attribute is applied to
void functions or variables.
2009-09-02 06:35:14 +03:00
M Joonas Pihlaja
c87b366bfe [constructors] Guard against being called without any input files.
The make-cairo-(test|boilerplate)-constructors scripts ought
never to be called without arguments lest we are left constructorless.
2009-09-02 06:33:22 +03:00
M Joonas Pihlaja
b509b548b1 [trace] Check for __builtin_return_address explicitly.
Some other compilers such as clang and icc support the
__builtin_return_address() intrinsic as well, so we don't
need to check for __GNUC__ >= 3 only.
2009-09-02 04:50:21 +01:00
M Joonas Pihlaja
2b0e070f6a [trace] Replace an open coded test for matrix identity.
The code has a _matrix_is_identity() function we can use
instead of open coding the same test.
2009-09-02 04:50:21 +01:00
M Joonas Pihlaja
70ea9e3ce1 [trace] Don't crash on unknown enums values.
If the tracer encounters an unknown enum value it
ought not to crash. Theis patch replaces the idiom
of looking up a name for an enumerated value directly
from a table by a switch statement. As a bonus we get
warnings from the compiler when the enums are updated
in cairo.
2009-09-02 04:50:20 +01:00
M Joonas Pihlaja
174c2620c8 [trace] Check for object stack underflow.
If the tracer's object stack underflows we want to
know about is as soon as possible. This patch adds
checks against the stack overflowing and aborts the
program with an object stack dump if it does.
2009-09-02 04:50:20 +01:00
M Joonas Pihlaja
bb480d2358 [NEWS] Thank the AuroraUX team for facilitating Solaris testing. 2009-09-02 04:48:40 +01:00
M Joonas Pihlaja
c64f6f8a15 [trace] Get the tracee program name from the environment.
Support non-Linux systems which don't have a /proc/self/cmdline
by transferring the application name given to cairo-trace via
an environment variable CAIRO_TRACE_PROG_NAME.
2009-09-02 04:42:07 +01:00
Chris Wilson
17cdffafda [xlib] Remove stray code
Grr. Should have spotted this before pushing - remove the addition of the
superfluous code.
2009-09-02 00:41:18 +01:00
Chris Wilson
59c4fe93ee [xlib] Eliminate GC clipping
Eradicate the use of clipping with GC. By never using clipping, we never
have to worry about retrieving a dirty clip from the GC cache.
2009-09-02 00:34:37 +01:00
Chris Wilson
075fc5666a [test] Add clip-image
Exercise the XCopyArea() paths under clipping - whilst modifying that code
I noticed that it was not being exercised by the test suite.
2009-09-02 00:33:22 +01:00
Chris Wilson
7d1eb259f9 [xlib] Make xlib_display_t private and rename xlib_screen_info_t
The issue Joonas was trying to solve was the unwanted inclusion of
the inlines via cairo-freelist-private.h. Unwittingly he included
cairoint.h from cairo-xlib-private.h instead, a far more heinous crime as
that causes the boilerplate to try to use the hidden, private symbols.
Instead we resolve this issue by making the cairo_xlib_display_t structure
private to cairo-xlib-display.c and provide functions to manipulate the
abstract data type. Whilst in the vicinity, we rename
cairo_xlib_screen_info_t to cairo_xlib_screen_t for consistency and
cleanliness.
2009-09-01 23:12:43 +01:00
Chris Wilson
b8ddd66cf6 Revert "[freelist] Make _cairo_freepool_alloc_from_new_pool static inline."
This reverts commit 5a3fa29b37 as it breaks
the boilerplate when linking with gcc.
2009-09-01 21:49:01 +01:00
M Joonas Pihlaja
5a3fa29b37 [freelist] Make _cairo_freepool_alloc_from_new_pool static inline.
The xlib boilerplate includes a cairo private header to be able
to disable usage of the render extension.  This indirectly includes
cairo-freelist-private.h which contains a bunch of static inline
functions which use the private _cairo_freepool_alloc_from_new_pool
function, but since that is not inline also, it causes an undefined
extern which cannot be resolved.  The binutils linker doesn't care
since the freelist function aren't actually used in the boilerplate
but the Solaris linker does.  By making the .._alloc_from_new_pool
function inline no dangling references are created and linking
succeeds.
2009-09-01 23:30:56 +03:00