Commit graph

4777 commits

Author SHA1 Message Date
Vladimir Vukicevic
3fcd0be522 Use pdiff only if the pixel difference is less than a limit 2008-02-25 21:06:35 -05:00
Vladimir Vukicevic
1dfb1bd45f [quartz] update test suite images for quartz 2008-02-25 21:06:28 -05:00
Vladimir Vukicevic
b439e63808 [quartz] fix mask to correctly take CTM into account 2008-02-25 21:06:25 -05:00
Vladimir Vukicevic
a4975ab117 [quartz] Optimize path handling where possible 2008-02-25 21:06:23 -05:00
Vladimir Vukicevic
63711b1d4a [quartz] Add quartz-image-surface type 2008-02-25 21:06:21 -05:00
Behdad Esfahbod
ecb54b9696 [test/get-path-extents] Don't use short-circuit && operators
That causes some tests to be skipped if the preceding test failed.
2008-02-25 19:48:58 -05:00
Behdad Esfahbod
be316b7cfa [test]/get-path-extents] Use %g instead of %f to print doubles 2008-02-25 19:36:44 -05:00
Adrian Johnson
7c8c9cf334 PDF: Support OPERATOR_SOURCE when pattern is opaque 2008-02-25 21:50:37 +10:30
Adrian Johnson
35295546ef Add mask pdf ref images
The mask test pdf output is now correct. Poppler ref images
are required due to minor gradient rendering differences.
2008-02-22 22:06:25 +10:30
Adrian Johnson
1df969158c Refresh clip-operator ps/pdf ref images
Because the meta surface analysis fix increased the size of some of
the fallback images.
2008-02-22 21:59:47 +10:30
Adrian Johnson
eae259168f Using correct surface size and clip when analyzing meta surface patterns
The surface size and clip needs to be saved before and restored after
replaying meta surface patterns back to the analysis surface. The clip
is reset and the correct surface size is set before replaying the meta
surface.
2008-02-22 21:07:31 +10:30
Adrian Johnson
0db2c67cc5 PS: Replace gsave/grestore with q/Q 2008-02-22 19:43:03 +10:30
Adrian Johnson
187ace8024 PS: Make debug code compile 2008-02-22 19:43:03 +10:30
Carl Worth
8f0ec1174a Patch hole in fabric of time-space continuum 2008-02-21 08:17:33 -08:00
Behdad Esfahbod
70bb2abed0 [cairo-ft] Handle font sizes smaller than 1px correctly
The FT_Set_Char_Size() docs say it replaces sizes smaller than 1.0 with 1.0.
So, we can't use x_scale and y_scale values less than one.  The fix is easy thouh,
cap them to 1.0 and let the FT transform do the scaling down.
2008-02-20 20:55:21 -05:00
Carl Worth
dcab5019d5 Add poppler-specific reference image for radial-gradient
This is justified by the previously mentioned bug on poppler
gradients. Note that this test only passes with a patch
to fix a bug in poppler (not yet upstream). Here it is:

	PATCH: Keep 'cairo_shape' and 'cairo' consistent
	https://bugs.freedesktop.org/show_bug.cgi?id=14593
2008-02-20 17:35:48 -08:00
Emmanuel Pacaud
70b683363f [SVG] Fix a8-mask test failure.
For A8 and A1 masks, the embedded mask image doesn't have an alpha channel.
In this case, the feColorMatrix should not be used, since it's goal is to
discard the color channels and to only keep the alpha one (which is what
we want when we have an ARGB32 mask image, since SVG uses all the channels
for the mask operation, where cairo only use the alpha channel).
2008-02-20 23:46:27 +01:00
Emmanuel Pacaud
c5d056aaeb [SVG] Fix the extend-reflect-similar test failure.
SVG doesn't support extend reflect for image pattern, and there isn't
any trivial way to emulate this feature. So we use the image fallback
for now. This fix also forces an image fallback for extend-reflect, but
in the end, it generates more or less the same file (one big image for
the pattern). No other test is forced to use an image fallback by this
patch.
2008-02-20 21:51:21 +01:00
Carl Worth
1d236521a5 Increment cairo version to 1.5.11 after the 1.5.10 snapshot 2008-02-20 10:00:41 -08:00
Carl Worth
83489f623f SGML churn 2008-02-20 10:00:31 -08:00
Carl Worth
0f2ecb5ec6 Update REFERENCE_IMAGES for distcheck 2008-02-20 08:24:32 -08:00
Carl Worth
ee62a5fad6 Mention that cairo_get_current_point is void again 2008-02-20 08:08:52 -08:00
Carl Worth
118657136d Increment cairo version to 1.5.10 and libtool versioning to 17:0:15 2008-02-20 08:06:39 -08:00
Carl Worth
5aacc54c43 NEWS: Add notes for cairo 1.5.10 2008-02-20 08:02:45 -08:00
Carl Worth
f954db72dd Add svg-specific reference image for mask-alpha
There's no apparent bug here.
2008-02-20 06:24:48 -08:00
Carl Worth
c197c684a6 Update ps-specific reference images for ghostscript 8.61
I was wrong in the previous message where I said I had ghostscript 8.61
installed. I do now, (and "gs --version" says the same thing), and
here are the new reference images.
2008-02-20 05:58:42 -08:00
Carl Worth
8d2d413014 Expand the documentation of cairo/test/README
Add notes on CAIRO_REF_DIR and the version requirements of
poppler and ghostscript necessary for getting no failures.
2008-02-20 05:11:53 -08:00
Carl Worth
4d42f56900 Update ps-specific reference images
Presumably these are due to ghostscript version churn. I don't
know what version was used in the past, but we're going to be
more careful about documenting versions now.

The ghostscript package I used here advertises itself as "8.61"
and "gs --version" reports 8.15.3.
2008-02-20 04:22:58 -08:00
Carl Worth
78b270601c Add poppler-specific reference image for source-clip-scale
This one doesn't have any associated poppler bug report. The
rendering by poppler is totally reasonable, and not problematic
at all with respect to what the test is actually testing for.
2008-02-20 04:04:05 -08:00
Carl Worth
64b7489a50 Add poppler-specific reference image for push-group
This is justified by the following new bug report:

	Incorrect clipping of group object (regression?)
	https://bugs.freedesktop.org/show_bug.cgi?id=14580
2008-02-20 04:04:05 -08:00
Carl Worth
7aaa3e67c5 Add poppler-specific reference images for tests needing EXTEND_PAD
This is justified by the following new bug report:

	Poppler should paint images with CAIRO_EXTEND_PAD
	https://bugs.freedesktop.org/show_bug.cgi?id=14578

The four affected tests are:

	paint-source-alpha
	paint-with-alpha
	rotate-image-surface-paint
	scale-source-surface-paint
2008-02-20 04:04:05 -08:00
Carl Worth
fdd046edcc Add poppler-specific reference image for text-pattern
This is justified with the following new bug report:

	Poppler renders patterned text as black
	https://bugs.freedesktop.org/show_bug.cgi?id=14577
2008-02-20 04:04:04 -08:00
Carl Worth
43302f0408 Re-enable pdf tests with gradients and add poppler-based reference images
This freezes the current (buggy) poppler result in the test suite
so that we will notice any future regressions.
2008-02-20 04:04:04 -08:00
Carl Worth
635fed7767 Re-enable some pdf tests now that poppler has knockout support
We had several pdf tests disabled waiting for this bug fix:

	Poppler does not correctly handle knockout groups
	https://bugs.freedesktop.org/show_bug.cgi?id=12185

That's in place for poppler now, so we're turning the tests
back on. Some of the affected tests now pass perfectly:

	over-above-source
	over-around-source
	over-below-source
	over-between-source

Some just needed new reference images:

	operator-clear
	clip-operator-pdf-argb32

The remaining tests still fail, but none of the failures can
obviously be ascribed to just poppler problems:

	clip-operator-pdf-rgb24
	operator-source
	unbounded-operator

The first two have some serious problems, while in the case
of unbounded-operator the problem is extremely minor (a white
grid appears in the background where the reference image is
all black).
2008-02-20 04:04:04 -08:00
Carl Worth
98189d860e svg: Add support for flattening SOURCE painting when there's nothing beneath it
This avoids unnecessary rasterization in many cases when using
cairo_surface_create_similar with an SVG surface. Because of that
it eliminates test-suite failures for the -similar cases where we
have svg-specific reference images. Namely:

	font-matrix-translation, ft-text-vertical-layout-type1,
	ft-text-vertical-layout-type3, mask, meta-surface-pattern,
	paint-source-alpha, paint-with-alpha, rotate-image-surface-paint,
	scale-source-surface-paint, source-clip-scale, text-pattern,
	text-rotate

In all of these cases the test suite was kindly noticing that we
weren't getting the same 'native' SVG output that was desired.
2008-02-20 04:04:04 -08:00
Carl Worth
e7c6e291a6 Add svg-specific reference images for meta-surface-pattern test 2008-02-20 04:04:04 -08:00
Carl Worth
a186741221 cairo-svg: Make operation_supported depend on analyze_operation instead of the other way around.
This prepares for analyze_operation to be able to return more than
just two values, (which will allow the svg backend to take advantage
of CAIRO_INT_STATUS_FLATTEN_TRANSPARENCY).
2008-02-20 04:04:04 -08:00
Carl Worth
8f11c4583f Revert "[meta-surface] Adjust tolerance when replaying to surfaces with device scale"
This reverts commit 7f21bfb0a8.

We don't yet have consensus on whether this is a good change or not.
So for now, we're favoring the existing behavior until we can work
that out.
2008-02-20 04:04:04 -08:00
Carl Worth
1747718406 Add a spline to the degenerate-pen test case
This was triggering an infinite loop (with 24.8 fixed-point) just before
the previous fix.

NOTE: I usually put bug demonstrations just before the fixes, but this
one was quite harsh---not only was cairo looping infinitely, but it
was appending to an array on each iteration---so not kind at all.
2008-02-20 04:04:04 -08:00
Carl Worth
d6d81c92b5 Eliminate a potential infinite loop in spline stroking
Sometimes > rather than >= can make a bug difference. The infinite loop
was noticed here:

	Infinite loop when scaling very small values using 24.8
	http://bugs.freedesktop.org/show_bug.cgi?id=14280

Note that that particular test case only exposes the infinite
loop when using 24.8 instead of 16.16 fixed-point values by
setting CAIRO_FIXED_FRAC_BITS to 8.
2008-02-20 04:04:04 -08:00
Carl Worth
770b058c9e Remove _cairo_slope_[counter_]clockwise
These two functions were hiding away some important details
about strictness of inequalities. Also, the callers differ
on the strictness they need. Everything is cleaner and more
flexible by making the callers just call _cairo_slope_compare
directly.
2008-02-20 04:04:04 -08:00
Carl Worth
2d22d698d3 Make _cairo_slope_compare return a non-zero result for slopes that differ by pi
This was an initial attempt to fix the infinite loop bug
described here:

	Infinite loop when scaling very small values using 24.8
	http://bugs.freedesktop.org/show_bug.cgi?id=14280

This doesn't actually fix that bug, but having a more robust
comparison function can only be a good thing.
2008-02-20 04:04:03 -08:00
Chris Wilson
9292c0a1b5 [gitignore] Ignore cairo-no-features.h
Add the autogenerated header to the ignore list.
2008-02-20 10:57:14 +00:00
Chris Wilson
e6a8768a04 [cairo-scaled-font-subsets] Fix memleak on failure to reserve .notdef glyph.
Remember to destroy the sub_font if we fail to reserve the .notdef glyph
during construction.

Whilst in the vicinity, adjust the function prototype to remove
duplicated calls to _cairo_error().
2008-02-20 10:57:04 +00:00
Chris Wilson
e208f31236 [cairo-surface] Check surface status on internal paths as well.
Return any error status on the surface to the caller.
2008-02-20 10:56:53 +00:00
Chris Wilson
1d59daecfe [cairo-pdf-operators] Cleanup word_wrap_stream
Ensure that the stream is destroyed on the error paths.
2008-02-20 10:56:37 +00:00
Chris Wilson
aac5650bee [pdf-operators] Missing private markup.
Fixup make check by adding the required cairo_private markup.
2008-02-20 10:56:24 +00:00
Adrian Johnson
eaaa1415a9 Change PDF newline characters from \r\n to \n
The PDF backend has always used "\r\n" for the newline character.
There was no particular reason for this choice. PDF allows "\n", "\r",
or "\r\n" as the end of line marker.

Since the PS backend (which uses "\n") has started sharing
cairo-pdf-operators.c with the PDF backend, the PS output has been
getting mixed "\n" and "\r\n" newlines.

Fix this by changing the PDF backend to use "\n".
2008-02-20 21:05:23 +10:30
Bertram Felgenhauer
24c319fbae [perf] add tests for magnified and minified image sources.
With this change, cairo's performance testsuite will catch performance
regressions in pixman's fbFetchTransformed path.
2008-02-19 22:19:44 +01:00
Antoine Azar
21049a9a5e Added cairo-misc.c to makefile 2008-02-19 00:17:47 -05:00