Commit graph

6444 commits

Author SHA1 Message Date
Chris Wilson
23df74e5ff [xlib] Cosmetic tweak.
Tightly scope the local rects.
2008-11-25 12:54:58 +00:00
Chris Wilson
06fabd6cbd [path] Fix up extents.
Forgot to round the box to the integer rectangle and missed why only
testing on image. Very naughty.
2008-11-25 12:54:58 +00:00
Luo Jinghua
1f44fb97f3 cairo-script: add $(top_builddir)/src to CPPPATH.
$(top_builddir)/src is needed to find cairo-features.h while
building out of tree.
2008-11-25 20:45:03 +08:00
Paolo Bonzini
487c708b3b [boilerplate] fix compilation for glitz-agl
As suggested on the list, this splits the cairo-boilerplate-glitz.c
file in three separate files, one for each backend.  Furthermore,
it fixes a few problems in compilation of the AGL backend test harness.
2008-11-25 20:40:37 +08:00
Chris Wilson
ca80b8c652 [pdf] Add a default case to silence the compiler.
The foolish compiler was emitting a warning about a potential
uninitialized variable even though the switch was fully populated.
2008-11-25 10:25:24 +00:00
Chris Wilson
b8991a1c69 [in-fill] Add the implicit close-path during move-to.
When interpreting a fixed-path for a fill operation, any move-to
implicitly closes the current path.
2008-11-25 10:24:58 +00:00
Chris Wilson
59de6fb89e [path] Compute approximate extents.
When computing the bounds of the clip path, we care more for a fast result
than absolute precision as the extents are only used as a guide to trim
the future operations. So computing the extents of the path suffices.
2008-11-25 10:16:32 +00:00
Chris Wilson
b6bf047494 [clip] Check for error surface
The update to use a NULL backend with an error surface broke creating a
context from an error surface.
2008-11-25 10:14:25 +00:00
Adrian Johnson
721cad9b24 Fix typo 2008-11-24 22:41:03 +10:30
Adrian Johnson
70e4c53272 Document location of image format specifications 2008-11-24 22:38:30 +10:30
Adrian Johnson
4ca644af27 Win32-print: Add PNG embedding support 2008-11-24 22:27:09 +10:30
Adrian Johnson
f59a3e03fc Add PNG get info function 2008-11-24 22:27:09 +10:30
Adrian Johnson
1892907e24 PDF: Disable PDF 1.5 features when version 1.4 is selected
JPEG 2000 image embedding and ActualText marked content are
PDF 1.5 features.
2008-11-24 22:27:09 +10:30
Adrian Johnson
c4a57385fa PDF: Add cairo_pdf_surface_restrict_to_version API
Now that we are using PDF 1.5 features, add an api to select between
version 1.4 or 1.5.
2008-11-24 22:27:09 +10:30
Adrian Johnson
d85e836911 PDF: Add newline to end of binary streams
PDF requires white space before the "endstream"
2008-11-24 22:27:09 +10:30
Adrian Johnson
b87d81ef0b Add image/jp2 to mime-data test 2008-11-24 22:27:03 +10:30
Adrian Johnson
7fdb712cba PDF: Add JPEG2000 image embedding
Requires increasing the PDF version to 1.5.
2008-11-23 21:05:41 +10:30
Adrian Johnson
0746efbf07 Add JPEG2000 mimetype and image info function 2008-11-23 21:05:36 +10:30
Adrian Johnson
5de1e4de93 Move cairo-jpeg-info.c to cairo-image-info.c
Other image formats will be added to the same file.
2008-11-23 18:33:58 +10:30
Luo Jinghua
63180edf6f glitz: set clone_offset_{x, y} on success in clone_similar.
With this fix, glitz backend passes 135 test cases and fails 66 test cases.
2008-11-23 11:42:26 +08:00
Luo Jinghua
36c1b3e591 glitz: fixup a stupid bug in get_image.
_pixman_format_from_masks returns a boolean instead of cairo status code.
Without this fix, get_image bails out over and over again even operations
was completed successfully. :-(
2008-11-23 10:27:49 +08:00
Nicolas Bruguier
c8b70aacc6 glitz: bring glitz backend to more or less working state.
Thanks Nicolas Bruguier for writing the original patch and
thanks Paolo Bonzini for pointing out. This patch converts 24.8
fixed point values into 16.16 ones before passing them down to glitz.
And I fixed a use-after-free issue in _cairo_glitz_surface_set_clip_region.
glitz_surface_set_clip_region takes the pointer and doesn't copy the
clip boxes, the original code frees the clip boxes immediately after
setting clip region. Keeping the box around with the life time of clip
region fixes the bug.
2008-11-22 18:16:17 +08:00
Chris Wilson
f15b1f26be [region] Use the caller supplied array for extracting boxes.
Allow the user to pass in a pre-allocated array and use it if the number
of boxes permits. This eliminates the frequent allocations during clipping
by toolkits.
2008-11-21 09:40:42 +00:00
Chris Wilson
9d2c55c661 [traps] Embed sufficient traps to accommodate a stroke rectangle
Small numbers of traps are frequently generated from either a path of a
single line, or that of a rectangle. Therefore should embed sufficient
storage with cairo_traps_t to accommodate the stroke of a single rectangle
(e.g. a pango unknown glyph hexbox) to avoid frequent allocations.
2008-11-21 09:40:42 +00:00
Chris Wilson
a11442154d [cairo] Allocate glyphs on the stack for show_text().
First try to use a stack buffer for the glyphs and clusters if the user
calls cairo_show_text() - for example, as pango does to draw the unknown hex
box.
2008-11-21 09:40:42 +00:00
Chris Wilson
9556266ffc [surface] Make the error surfaces have a NULL backend.
By using a NULL backend for the error surfaces, instead of a pointer to
the image surface backend end, we save a few lookup/redirections during
dynamic linking.
2008-11-21 09:40:42 +00:00
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