Commit graph

5906 commits

Author SHA1 Message Date
Carl Worth
ea4d0bafb3 Add svg-specific reference image for mask-transformed-similar.
The only difference in this case is whether there is blurring
of the image around the edges. That's a rasterization issue
that we don't care about, (we're testing that the correct
transformation is applied).
2008-09-24 16:25:38 -07:00
Carl Worth
f939e46304 Add pdf-specific reference images for gradient-constant-alpha.
Like many other gradient tests, we're just capturing the buggy
output of poppler here, (though this time I *did* verify with
Adobe acroread that our PDF output seems to be correct).
2008-09-24 16:21:57 -07:00
Carl Worth
9335ad313f Ignore generated files.
I know that I didn't create these Makefile.win32.features files,
so I assume that they are the result of Behdad's build magic and
that he just forgot to add them to .gitignore.
2008-09-24 16:20:35 -07:00
Carl Worth
06594abc6b Add pdf-specific reference images for fill-alpha-pattern.
These capture the current poppler output, (rather than the
ideal output). We're still waiting for poppler to start
using cairo gradients before this test will run through
cleanly. And even with these new reference images, there's
still some translation variance, so the -25 tests still
fail.
2008-09-24 16:11:10 -07:00
Carl Worth
64541a58ae Add pdf- and ps-specific reference images for device-offset-fractional
We don't care about the specifics of rasterization in the viewer
here, (though it still might be worth being more careful about
how we set /Interpolate---but that's not the point of this test).
2008-09-24 16:11:09 -07:00
Chris Wilson
ba7ef8b40e [configure.ac] Bump poppler dependency to 0.9.2
poppler-0.9.2 is required for replaying user-fonts correctly.
2008-09-24 22:37:08 +01:00
Chris Wilson
dfe9f7093f Revert "[pdf] Tweak the mask analysis to avoid an assertion failure."
This reverts commit c9ec82f3a8, which
notably caused regresions in the mask and clip-operator tests.

Obviously I'm not smart enough to fix bugs. Since the computer found the
assertion failure, I need to train the computer to fix the bugs as well.
2008-09-24 22:37:08 +01:00
Behdad Esfahbod
ab682a6ff2 Add README.win32, courtesy of Damian Frank 2008-09-24 17:23:28 -04:00
Behdad Esfahbod
5a06ca852c [Makefile.win32] Also report installing cairo-version.h and cairo-features.h
Those two files needs special care and hence are not listed in
enabled_cairo_sources.
2008-09-24 17:23:28 -04:00
Behdad Esfahbod
a91101df31 [Makefile.sources] Remove mention of cairo-features-win32.h
That file is not generated anymore.  Instead, cairo-features.h is
generated from Makefile.win32 on the fly.
2008-09-24 17:23:28 -04:00
M Joonas Pihlaja
55e06745a6 [perf-suite] Explicitly read the results of rdtsc from edx:eax.
The =A format used to read a 64 bit result from rdtsc works on x86,
but not on x86-64.
2008-09-25 00:17:57 +03:00
Behdad Esfahbod
2fb59b3ebd [Makefile.win32] Report which files to install
The win32 build system has no way to install anything, but it has
full knowledge of what needs to be installed (which headers).  So
we now report files to be installed at the end of the build.
2008-09-24 17:09:54 -04:00
Behdad Esfahbod
6eee90784e Enable CAIRO_HAS_UTF8_TO_UTF16 if PDF_OPERATORS is enabled
We are being cheap and don't define the cairo_utf8_to_utf16 function
if no one is using it.  Previously PS surface was not using it, but
after the pdf-operators merge, it was.

Before this commit, building with PS but without PDF failed.  Fixing.
2008-09-24 15:04:11 -04:00
Behdad Esfahbod
bb125689d3 Simplify preprocessor conditional syntax
We never do #ifdef-type conditions on CAIRO_HAS_* macros, because we
want to allow setting them to zero.  Then if we need to enable a feature
if either of PS or PDF is enabled, the proper syntax is:

	#if CAIRO_HAS_PS_SURFACE || CAIRO_HAS_PDF_SURFACE

This works because the preprocessor replaces any unknown identifiers with
zero.  Some versions of gcc had a bug that got them very confused with
complex versions of the above.  As a workaround for that I have been using
the uglier version:

	#if CAIRO_HAS_PS_SURFACE+0 || CAIRO_HAS_PDF_SURFACE+0

which magically worked around that bug.  Or more recently replacing that
with the duplicated version:

	#if CAIRO_HAS_PS_SURFACE
	...
	#endif
	#if CAIRO_HAS_PDF_SURFACE
	...
	#endif

Both are uglier than the original.  Since the gcc bug was very short lived
and there's lots of software out there relying on the original form to work,
moving back to the simple version seems harmless.
2008-09-24 15:04:11 -04:00
Chris Wilson
adece69ae3 [test] Add a test case to question the mutability of sources.
Are patterns mutable? The image backend is quite happy to write and read
from the same surface, whereas the vector targets create snapshots... This
test case exploits that inconsistency.

Also the interested reader will note that not only does this demonstrate
translational invariance, but a discrepancy with similar surfaces.
2008-09-24 19:22:22 +01:00
Chris Wilson
88188eabab [test] Memleak in new mask-ctm-* tests.
Add the forgotten cairo_surface_destroy().
2008-09-24 17:32:45 +01:00
Chris Wilson
8f15730368 [test] Rename mask-ctm-* to avoid conflict with mask-ctm.
Using mask-ctm-image as a test name was causing a naming conflict with
mask-ctm, so rename the new tests.
2008-09-24 18:41:24 +01:00
Chris Wilson
444d44acde [stroke] Cap trailing segment when skipping invisible segments.
If we do not maintain the current_face even for invisible dashed segments,
then we will generate spurious line segments when attempting to close the
path (ala leaky-dashed-rectangle).

This fixes the long standing regression introduced just prior to 1.6 and
captured in these bug reports:
http://lists.cairographics.org/archives/cairo/2008-April/013912.html
http://bugs.freedesktop.org/show_bug.cgi?id=17177
2008-09-24 18:41:24 +01:00
Behdad Esfahbod
9fc745ae9f Revert "[build] Use mkdir -p portability macros"
This reverts commit 03c37f56b2.

The AC_PROG_MKDIR_P is also one of those autoconf macros defined
in newer versions only.  Since we use mkdir -p in releasing scripts
only, it's not a big deal if it's not portable.
2008-09-24 13:18:12 -04:00
M Joonas Pihlaja
b5b1134c2c [tessellator] Skip edges that lie outside the region of interest.
We don't need to tessellate edges strictly above or below the
the limits of the traps.
2008-09-24 17:54:53 +01:00
M Joonas Pihlaja
018a64bf7f [traps] Impose limits on traps for cairo_in_(fill|stroke)
We don't need to tessellate edges strictly above or below the
hit-test point.

(Patch split and modified by Chris Wilson to apply to cairo_in_stroke()
as well - all bugs are his alone.)
2008-09-24 17:54:50 +01:00
Chris Wilson
8c0ff8b585 [cairo] Define min-tolerance in terms of cairo_fixed_t
By using the cairo_fixed_t macros we can compute the correct minimum
tolerance for any configuration.
2008-09-24 17:05:08 +01:00
Chris Wilson
c9ec82f3a8 [pdf] Tweak the mask analysis to avoid an assertion failure.
Both the source and mask need to be analyzed and checked for an
UNSUPPORTED operation before determining the best course of action.
As before this is simply decided based on the requirements of the
source.
2008-09-24 15:05:23 +01:00
Chris Wilson
b9c92842d9 [trap] Trivial reject if trapezoid is entirely above or below
Also check whether is vertically within limits.
2008-09-24 11:45:51 +01:00
Chris Wilson
911d5f1a25 [traps] Adjust lines if either point is on the boundary.
If either point lies on the limit and the other outside, adjust the line
to be parallel to the boundary. This adjusts the previous test where both
points needed to be entirely outside.
2008-09-24 11:45:40 +01:00
Chris Wilson
7357e80054 [clip] Limit traps.
Apply prior knowledge to limit the traps during clipping to avoid
generating extra work.
2008-09-24 11:45:26 +01:00
Chris Wilson
c36a242303 [traps] Replace open-coding of box->rectangle->box
Use the utility functions _cairo_box_from_rectangle and
_cairo_box_round_to_rectangle() instead of open-coding. Simultaneously
tweak the whitespace so that all users of traps look similar.
2008-09-24 11:45:13 +01:00
Chris Wilson
49b9a21e0b [test/any2ppm] Handle filenames with multiple-dots.
Use strrchr() to find the extension, as strchr() is fooled too easily.

As spotted by Carlos Garcia Campos.
2008-09-24 02:03:10 +01:00
Chris Wilson
651c6598c9 [traps] Limit extents to imposed constraints.
When reporting the extents of the traps, constrain them to the imposed
limits. This is relied upon in the analysis-surface which sets the
limits on the traps (based on clip/surface extents) and then reports the
extents of the traps as the region of the operation.
2008-09-24 01:02:48 +01:00
Behdad Esfahbod
0baf12f450 [scaled-font] Another typo fix in the comments
Both this and previous one kindly pointed out by Carl.
2008-09-23 19:18:00 -04:00
Behdad Esfahbod
70207aadfd [mutex] Fix typo in comments 2008-09-23 19:11:31 -04:00
Chris Wilson
0a4a6213e2 [fill] Check for the most common rectilinear case first.
Avoid the iterative search for the extreme points by first checking the
most likely arrangement (as produced by cairo_rectangle() under no
transformation).
2008-09-23 23:55:38 +01:00
Chris Wilson
8f51ea4657 [pattern] Beware unsigned wrap-around with pathological surface patterns.
A surface pattern under an extreme transformation could lie entirely in
the negative quadrant. This would trigger the fixup such that it's lower
left corner was clamped to the origin, but the upper right corner was left
unchecked. This could result in the width,height being negative and
wrapping around to large values instead of being clamped to 0.
2008-09-23 23:35:53 +01:00
Chris Wilson
3c6d3684e9 [test] Add a test case for create_similar(CONTENT_ALPHA)
Application of a pure-alpha similar source is inconsistently handled
across the backends. The PDF/PS backends allow the rgb channels to bleed
through and the SVG backend mixes in pure white.
2008-09-23 23:35:53 +01:00
Chris Wilson
5e54084126 [test-meta] Use real meta-surface snapshot.
The meta-surface workaround an old bug, which is no longer present in the
tree and open-coded the surface snapshot. However, the workaround itself
was buggy (not respecting the surface content). The lesson to take away
from this is not to add workarounds in test code for bugs in the library!
2008-09-23 23:35:53 +01:00
Behdad Esfahbod
03c37f56b2 [build] Use mkdir -p portability macros 2008-09-23 17:15:07 -04:00
Chris Wilson
ae0511fbbe [pdf] Do not modify the dashes in-place.
As PS has different semantics regarding a zero-length dash, we need to
adjust the dash array before emitting. However, we need to modify a copy
of the dash array since the same array may be used by the meta-surface
when replaying to an image fallback.
2008-09-23 20:08:38 +01:00
Chris Wilson
b7ab1fc791 Return the real error status for set_user_data()
Instead of returning a new NO_MEMORY error, return the status from the
error object.
2008-09-23 20:08:30 +01:00
Adrian Johnson
0204d2f4e2 Replace two boolean args with one enum arg
The use of multiple booleans in a function call can make it easy to
mix up the parameters.
2008-09-23 22:38:55 +09:30
Behdad Esfahbod
5a3f03623c [Makefile.win32] Add comments about where to edit for customization 2008-09-23 04:11:48 -04:00
Behdad Esfahbod
afb32c7f07 [src/Makefile.am.analysis] Fix out-of-tree build 2008-09-23 03:58:17 -04:00
Behdad Esfahbod
fba0211ed6 [Makefile.win32] Add makefile rules to generate cairo-features.h 2008-09-22 23:41:07 -04:00
Behdad Esfahbod
0bedbe78fe [Makefile.win32] Misc cleanup 2008-09-22 22:46:05 -04:00
Behdad Esfahbod
ebb5eb57b7 Generate build/Makefile.win32.features 2008-09-22 22:24:38 -04:00
Behdad Esfahbod
fd5cef50a7 [aclocal] Add support for automake-only or win32-only makefiles 2008-09-22 20:48:14 -04:00
Behdad Esfahbod
42e4103015 [aclocal] Don't do automake conditionals for builtin features 2008-09-22 20:33:23 -04:00
Behdad Esfahbod
79bc967a0d [build] Make including Makefile.win32.features files more robust
By using top_srcdir if available.  Make's include is relative to
current dir, not the Makefile being processed.  That makes it hard
to include Makefile's relatively.
2008-09-22 20:20:02 -04:00
Behdad Esfahbod
e686a00da8 [build] Add CAIRO_CONFIG_MAKEFILE_PRIVATE 2008-09-22 20:11:39 -04:00
Behdad Esfahbod
0ac7a242f8 [build] Add Makefile.win32.common 2008-09-22 20:11:38 -04:00
Behdad Esfahbod
984320dff1 [build] Don't define feature variables in Makefile.win32.features
This is not the right place to do that as one also needs to adjust
cairo-features.h.  Working on a proper fix.
2008-09-22 20:11:32 -04:00