Commit graph

6518 commits

Author SHA1 Message Date
Chris Wilson
cfd2c73826 [image] Trim image surface size by a few bytes
Convert an infrequently accessed series of cairo_bool_t and short enums
to a common bitfield.
2008-11-21 09:40:37 +00:00
Chris Wilson
1f48b36933 [script] Build fix for ! HAS_FT_FONT
Correct the macro definition used when compiling without FreeType.
2008-11-21 09:35:41 +00:00
Chris Wilson
0d5e533b6c [trace] Correctly push font-face onto the operand stack.
We tried to push a reference to an undefined font-face, now we just copy
from the operand stack.
2008-11-19 17:11:50 +00:00
Chris Wilson
b426346b48 [trace] Construct matrices directly
Avoid building a temporary array by constructing the matrix directly.
2008-11-19 17:11:49 +00:00
Chris Wilson
727ff2bd72 [xlib] Explicitly track whether the GC has clip_rects.
Simplify the logic and remove some pessimism from the code by explicitly
tracking when we set clip rectangles on the GC.
2008-11-19 17:11:49 +00:00
Chris Wilson
63a86a470f [surface] Replay meta surfaces to a similar surface.
When cloning a meta-surface, first attempt to replay it to a similar
surface rather than a full-sized image buffer.
2008-11-19 14:06:10 +00:00
Chris Wilson
7657bda017 [perf/pythagoras_tree] Another fractal.
Test lots of rectangles and recursion path construction.
2008-11-19 14:06:10 +00:00
Chris Wilson
abd0a2627d [perf/dragon] Add a dragon curve perf case.
Inspired by http://labs.trolltech.com/blogs/2007/08/31/rasterizing-dragons/
and http://en.wikipedia.org/wiki/Dragon_curve, add a performance test case
to measure drawing this space-filling fractal curve.
2008-11-19 14:06:10 +00:00
Chris Wilson
81ef772aa0 [xlib] Mark GC as dirty if we have an outstanding clip.
Ginn Chen reported a regression with Firefox where "the whole area of web
page is transparent until it redraws", and bisected it to the change to
lazily clear the clip.

The bug would appears to be when we have an inconsistent GC clip - i.e.
the clip on the surface has been cleared, but we have not yet used and
thus cleared the GC, so that we did not mark the GC as having a clip set
when we freed it.
2008-11-19 11:59:21 +00:00
Chris Wilson
c41b99268d Conditionally include byteswap.h
Fixup compilation by copying the checks from cairo-wideint-private.h to
conditionally include byteswap.h and provide fallback implementations.
2008-11-19 11:59:21 +00:00
Chris Wilson
8345fedbe4 [spline] Fix compile.
Do not return the result of a void function. gcc chose to not warn about
this when removing the return parameter...
2008-11-19 11:59:21 +00:00
Chris Wilson
b6c371a47f [pattern] Cosmetic.
surface is equal to pattern->surface at this point.
2008-11-19 11:59:21 +00:00
Chris Wilson
7894abbe6d [test] Support foreground only execution.
Add an option to prevent forking - which makes it difficult to
valgrind/gdb individual tests.
2008-11-19 11:59:20 +00:00
Chris Wilson
645df0c6d2 [scaled-font] Clean-up compiler warning.
gcc warns that the status may be used uninitialized, so fix it.
2008-11-19 11:59:20 +00:00
Chris Wilson
2fdee49074 [compiler] likelihood macros
Behdad prefers these to be upper-case to be consistent with G_UNLIKELY and
friends. However, as I intend to use these for nearly all instances of
if(status), I suggest that we keep to the short and not so loud:
    if (unlikely (status))
       return status;
2008-11-19 11:59:20 +00:00
Chris Wilson
97edc680c1 [twin] Reduce tolerance.
As the glyphs are rendered to cache, ensure that they are rendered at the
highest quality settings.
2008-11-19 11:59:20 +00:00
Chris Wilson
e50538863a [twin] Tweak line width.
Slightly increase line width to eliminate internal holes in the characters
where the strokes were not quite overlapping.
2008-11-19 11:59:20 +00:00
Chris Wilson
91c17d3332 [trace] Simple unbounded cache for symbol lookups.
Reparsing the dwarf info for every lookup is very slow, so cache the
symbol lookups. This initial implementation is unbounded in the simple
belief that the actual number of unique lookups during a program's
lifetime should be fairly small. (Extending to a bounded MRU list is left
as an exercise for the reader.)
2008-11-19 11:59:20 +00:00
Chris Wilson
2839a0e800 [script] Add a simple replay.
A very simple replay program for trace replay.
2008-11-19 11:59:20 +00:00
M Joonas Pihlaja
b091c5bfca BIBLIOGRAPHY: Cite Hars & Petruska's Pseudorandom Recursions paper. 2008-11-18 00:20:38 +02:00
Chris Wilson
3a82f94398 [test] Add util/cairo-script to include path.
any2ppm needs the include path for cairo-script-interpreter so that it can
be built without an existing install.
2008-11-16 18:21:52 +00:00
Chris Wilson
997fa6a772 [configure] Remove old line for CairoScript testing.
CairoScript testing should now be unconditional so remove the surplus
message.
2008-11-16 17:43:40 +00:00
Chris Wilson
a2eff7c7de [test] Add build rule for libcairo-script-interpreter.la
Add a rule to build the cairo-script-interpreter on behalf of any2ppm.
2008-11-16 16:21:37 +00:00
Chris Wilson
bf309aab60 [configure] Delete CAN_TEST_SCRIPT
A CairoScript interpreter is built under utils and so is always available.
2008-11-16 16:21:37 +00:00
Chris Wilson
d7873eecc5 [spline] Eliminate intermediate allocations during spline decomposition.
The spline decomposition code allocates and stores points in a temporary
buffer which is immediately consumed by the caller. If the caller supplies
a callback that handles each point computed along the spline, then we can
use the point immediately and avoid the allocation.
2008-11-16 16:21:25 +00:00
Chris Wilson
3bf8379408 [type1] Propagate fatal NO_MEMORY erro from FreeType.
If FreeType fails to load the glyph, check for a fatal error before
falling back (and effectively masking the fatal condition).
2008-11-16 16:21:24 +00:00
Chris Wilson
db9ed77d8a [cairo] FLush surface on cairo_destroy()
When discussing the implications of snapshot cow, one of the questions
that we raised was what happens on cairo_destroy()? The lifetime of the
context implicitly marks the extents of the drawing operations, typically
the expose event (or perhaps one phase of it). Therefore at the end of the
sequence we implicitly wish to flush the graphics events to the surface.
2008-11-16 16:21:24 +00:00
Chris Wilson
032be9849d [skiplist] Inline testing.
Add a loop to create a skip list to allow manual checking.
2008-11-16 16:21:23 +00:00
M Joonas Pihlaja
e44c1f26e4 Use a smaller and faster random number generator.
The previous LFSR generator used a large table to be speedy.  The
replacement generator is the single stage generator (1) from section
5.4 of [HP2007], requires no tables or extra state.  I've run the
generator through Rob Brown's extended Dieharder test suite and it
passes all but one self-proclaimed buggy test (-d2) and the 2D sphere
minimum distance test (-d12).

[HP2007] Hars L. and Petruska G., ``Pseudorandom Recursions: Small and Fast Pseurodandom Number Generators for Embedded Applications'',
Hindawi Publishing Corporation
EURASIP Journal on Embedded Systems
Volume 2007, Article ID 98417, 13 pages
doi:10.1155/2007/98417
http://www.hindawi.com/getarticle.aspx?doi=10.1155/2007/98417&e=cta
2008-11-16 16:21:23 +00:00
Chris Wilson
a4c5371b5e [os2] Move include cairo.h before os2.h
The defines need to come first, but we specify that cairo.h is the first
header file to be included by files.
2008-11-16 16:21:23 +00:00
Carl Worth
456252a1c2 Merge branch '1.8'
Conflicts:

	NEWS
	cairo-version.h
2008-11-14 15:27:34 +01:00
Carl Worth
ab61544b30 Increment version to 1.8.5 after the 1.8.4 release. 2008-11-14 13:17:01 +01:00
Carl Worth
66e8f142e3 Increment version to 1.8.4 2008-11-14 11:08:40 +01:00
Carl Worth
b9c1344ad8 NEWS: Add notes for cairo 1.8.4
Just a few bug fixes here.
2008-11-14 11:07:10 +01:00
M Joonas Pihlaja
3b11997a23 [cairo-script] Remove outdated #error to allow compilation to succeed.
The interpreter doesn't depend on the script surface anymore.
2008-11-13 18:06:40 +02:00
Carl Worth
d654d528de Blacklist "X.Org" < 7.0 with the buggy_repeat workaround.
This is in response to a report that a 6.9 server crashes with
cairo's extend-reflect test:

https://bugs.freedesktop.org/show_bug.cgi?id=15628#c2
2008-11-13 16:54:00 +01:00
Carl Worth
35a1ba0ddc Document the buggy_repeat workaround more carefully.
It's a confusing condition, so let's be explicit about where
the various numbers come from.
2008-11-13 16:54:00 +01:00
Chris Wilson
cdfffc7420 Add CairoScript interpreter
Add a CairoScript interpreter library and use it to replay the test output
for the CairoScript backend. The library is also used by the currently
standalone Sphinx debugger [git://anongit.freedesktop.org/~ickle/sphinx].
The syntax/operator semantics are not yet finalized, but are expected to
mature before the next stable release.
2008-11-13 11:36:55 +00:00
Chris Wilson
a856371bef Add CairoScript backend.
A new meta-surface backend for serialising drawing operations to a
CairoScript file. The principal use (as currently envisaged) is to provide
a round-trip testing mechanism for CairoScript - i.e. we can generate
script files for every test in the suite and check that we can replay them
with perfect fidelity. (Obviously this does not provide complete coverage
of CairoScript's syntax, but should give reasonable coverage over the
operators.)
2008-11-13 11:36:54 +00:00
Chris Wilson
47a56e0850 [type1] Bind the RD procedure
As the RD procedure may be called several hundred times for a full font,
it is worth binding.
2008-11-13 11:36:50 +00:00
Chris Wilson
0769d39d00 Add predicate likelihood macros.
Define the couple of standard macros that we can use to guide gcc
optimisations of which code path will be most likely taken.
2008-11-13 11:36:44 +00:00
Chris Wilson
b06c50cc54 [cairoint.h] Remove unused PLT entries.
Trim the slim_hidden_proto/def to match the currently used functions.
2008-11-13 11:36:43 +00:00
Chris Wilson
20fc2a2f92 [in-fill] Fixup boundary insideness testing
Benjamin Otte noticed that the top-left vertex was now included within the
fill extents. Having updated the test case to check the insideness
conditions as defined by flash, fix the edge handling to match.
2008-11-13 11:36:43 +00:00
Chris Wilson
9afad53730 [test] Expand in-fill-trapezoid
Test vertices and edges of a rectangle to probe 'corner-cases', using the
insideness conditions from flash.
2008-11-13 11:36:42 +00:00
Chris Wilson
cebc84f367 [hash] Separate out unique patterns of iterating over the table.
Avoid unnecessary conditionals for the hotpaths by separating out the
iteration over the elements into their distinct modes.
2008-11-13 11:36:42 +00:00
Chris Wilson
5f0aa27445 [trace] Add caller line info.
Use lookup_symbol() on the return address to identify the caller and emit
useful debug info to the trace.
2008-11-13 11:36:42 +00:00
Chris Wilson
4cd6b0c0b9 [trace] Check for an undefined pattern and use index instead. 2008-11-13 11:36:41 +00:00
Chris Wilson
76f249a493 [trace] Detect and report broken traces.
We cannot trace the cairo-script-interpreter as that uses Cairo's private
symbols.
2008-11-13 11:36:40 +00:00
Chris Wilson
01e2021b2b [trace] Trace mark-dirty
Capture the image data on mark dirty and record in the trace.
2008-11-13 11:36:39 +00:00
Chris Wilson
8f3d0b55f5 [trace] Add unstable warning.
Add warning that CairoScript is unfinished and I may radically alter the
format/syntax/language before release.
2008-11-13 11:36:32 +00:00