Commit graph

163 commits

Author SHA1 Message Date
Adrian Johnson
7c6f2d4f24 Add ft-color-font test 2021-07-31 08:56:59 +09:30
Adrian Johnson
6fbfc9d927 pdf: use floating point widths when emitting fonts 2021-07-27 20:13:23 +00:00
afdw
9ab52c9131 Merge branch 'master' into 'svg-backend-work'
# Conflicts:
#   .gitlab-ci.yml
#   test/Makefile.sources
#   test/meson.build
2021-05-29 18:32:53 +02:00
Anton Danilkin
c2bf6e8ae4 Fix remaining tests 2021-05-05 00:51:01 +02:00
Anton Danilkin
42128f1742 Fix reference images 2021-05-03 22:13:16 +02:00
Anton Danilkin
5b678d8185 Fix applying shifted operators 2021-05-03 16:33:05 +02:00
Uli Schlachter
4f61b765c9 Merge branch 'record-png-offset' into 'master'
Add a test case for commit d07fb41056

See merge request cairo/cairo!122
2021-05-02 14:55:48 +00:00
Anton Danilkin
bd487e64fc Add support for CAIRO_CONTENT_COLOR 2021-05-01 23:14:24 +02:00
Anton Danilkin
917f366ad1 Add a test for #431 2021-04-11 23:59:47 +02:00
Anton Danilkin
ceae137ba6 Finish implementing correct paints in transformed recording patterns 2021-04-11 23:59:47 +02:00
Anton Danilkin
71eef9c8bc Implement the rest of the operators 2021-04-11 23:59:47 +02:00
Anton Danilkin
170f8812fb Add a test for #361 2021-04-11 23:59:47 +02:00
Uli Schlachter
753ea90ac1 Add a test case for commit d07fb41056
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-04-01 17:02:48 +02:00
Uli Schlachter
ee43299276 Make the test case for bug 448 pass
Someone apparently forgot to actually add the reference image. And also
forgot to add the test to meson. Sigh.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-02-06 16:40:48 +01:00
Heiko Lewin
03a820b173 Fix mask usage in image-compositor 2020-12-15 16:48:19 +01:00
Massimo Valentini
82a2477a4a add a test to exercise tor22 spans allocation code path 2019-05-10 15:02:54 +00:00
Bryce Harrington
ad7ac7dbca Normalize one more test image with minor gradient differences
For me, with this fix, the base image test cases now pass 100%, when
running:

  make test TARGETS=image FORMAT=rgba

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2018-09-14 11:34:22 -07:00
Bryce Harrington
53e4775327 Normalize more test reference images with minor text rendering differences
The discrepancies in these tests appear to all be font rendering /
antialiasing, probably due to algorithmic changes in Pixman.

Some of these reference images were updated in Federico's recent patch,
so the fact that they differ on my system may indicate there may be some
system dependencies beyond just pixman, that can cause test result
variation from person to person.  Ideally, these would be isolated and
the tests modified to not have such dependencies.

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2018-09-14 11:34:22 -07:00
Federico Mena Quintero
2b1f096145 Normalize test reference images with minor text rendering differences
[In testing, I was able to reproduce Federico's results for most, but
not all, of the test images.  There might be some additional
platform-specific discrepancies that need ironed out, but this is a
solid step forward in any case.

Results for a quick run against just the image backend on my system:

--bryce]

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Bryce Harrington <bryce@bryceharrington.org>
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2018-09-05 17:00:44 -07:00
Federico Mena Quintero
fb24d7b737 Normalize test images with minor gradient differences
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Bryce Harrington <bryce@bryceharrington.org>
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2018-09-05 17:00:44 -07:00
Federico Mena Quintero
cfc90ca91e Normalize extended-blend-mask.{argb32,rgb24}.ref.png
I don't see how the old reference file could have been generated.
Things I tried:

* Using an old pixman (but it seems that the relevant code for Adobe
  extended blend modes has not changed?)

* Using the Cairo version where the test was first introduced.

* Changing the alpha value from .5 to something else.

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Tested-by: Bryce Harrington <bryce@bryceharrington.org>
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2018-09-05 17:00:44 -07:00
Uli Schlachter
50a6ad5389 pthread-same-source: Refresh reference images
I already did the same thing in commit 3e22a8580a. That commit added
a GENERATE_REFERENCE mode that does not use threads and used that for
generating the reference image.

However, the above commit falls into the range between commits
fb57ea13e0 and 3d94269bd4. The later commit reverts the earlier one,
which changed the way that image downscaling works / is used.

This means that the reference image that were generated back then were
broken. Thus, regenerating the images is the right thing to do.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
2018-04-02 11:16:34 -07:00
Adrian Johnson
164be89660 test: update some stale ref images 2017-11-10 20:10:01 +10:30
Adrian Johnson
71746c37d4 test: use CAIRO_MIME_TYPE_UNIQUE_ID with record-text-transform
The PS output from this test is > 100MB due to the duplicated images.
Using CAIRO_MIME_TYPE_UNIQUE_ID reduces the PS output to 650k, runs
considerably faster, and now produces correct output.
2017-11-09 22:02:05 +10:30
Adrian Johnson
e1a02b180d Add CCITT_FAX mime type for PDF and PS surfaces
This completes the full set of PDF/PS image filters allowing image
data to be passed though without decompressing then recompresssing in
a less efficient format.

The difficulty with CCITT_FAX is it needs some decoding parameters
that are not stored inside the image data. This is achieved by using
an additional mime type CCITT_FAX_PARAMS that contains the params in
key=value format.
2017-10-22 08:42:36 +10:30
Andrea Canciani
a3cc46d2cc quartz-font: Fix text-glyph-range
The index 0 is a legitimate index used for character codes that do not
correspond to any glyph in the font.  Instead, the API reserves 0xFFFF
(kCGFontIndexInvalid) as the invalid index and defines 0xFFFE
(kCGFontIndexMax = kCGGlyphMax) as the maximum legal index.

Fixes text-glyph-range.
2017-04-25 18:06:14 +02:00
Andrea Canciani
cb9f627378 test: Add a test for characters in the SMP
Unicode characters in the Supplementary Multilingual Plane are encoded
as surrogate pairs in UTF-16. This test tries to verify that backends
do not perform UCS4 to UTF-16 conversion by truncation.
2017-04-25 18:05:40 +02:00
Adrian Johnson
deb994488f test: refresh text-rotate ref images 2016-07-05 20:26:47 +09:30
Adrian Johnson
d92015e4f9 add test text-unhinted-metrics
Based on bug report in https://lists.cairographics.org/archives/cairo/2016-April/027334.html
2016-07-05 20:26:47 +09:30
Adrian Johnson
113ba5f3fa Update ref images
ref images were creating using Debian Jessie 64-bit and latest poppler.
2016-06-05 20:43:36 +09:30
Adrian Johnson
14fa88fd02 pdf: fix record-replay-extend test failures 2016-06-05 20:43:36 +09:30
Adrian Johnson
e7b1cb0c53 image: fix record-replay-extend test failures 2016-06-05 20:43:36 +09:30
Adrian Johnson
8e4d4de2a3 test: replay record surface with negative extents for each extend mode
image fails for repeat, reflect, and pad.
2016-06-05 20:43:36 +09:30
Adrian Johnson
a736fd8699 Fix PDF record-neg-extents test failure
Modify PDF surface to allow surface extents to have negative x, y.
When emitting recording surfaces, set the surface extents to the
recording extents.
2016-06-05 20:43:36 +09:30
Adrian Johnson
d2dc2e90a7 Fix test failures when recording surface extents has negative x,y
Fixes record-neg-bounded-extents (image only) and
recording-ink-extents.
2016-06-05 20:43:36 +09:30
Adrian Johnson
9fff6f0be3 test: add record-neg-extents
Test case for bug 89232 - painting a recording surface to a
pdf/ps surface omits objects on the recording surface with negative
coordinates even though the pattern matrix has transformed the objects
to within the page extents.

The image surface also fails when the recording surface is bounded.
2016-06-05 20:43:36 +09:30
Adrian Johnson
30eb1b0e97 Add test case for thin lines
Bug 77298
2015-10-17 18:39:19 +10:30
Adrian Johnson
6952e03262 ps: fix raster source patterns 2015-10-17 18:16:22 +10:30
Andrea Canciani
68e12cd37f test: Update quartz reference images 2015-07-27 12:45:59 +02:00
Andrea Canciani
89942c6af0 test: Correct bug number in clip-complex-bug61592
The filename of the C source file is correct, but the test name (both
as function name and as reference image name) has a typo in it.

Related to https://bugs.freedesktop.org/show_bug.cgi?id=61592
2015-04-16 11:28:50 +02:00
Andrea Canciani
654b4a8efe test: Fix coverage-intersecting-triangles reference
Commit 4e3ef57bc8 added
coverage-intersecting-triangles with an incorrect reference and
generator. The test checks the rasterization of two overlapping
triangles in the following position:

   .   .
   |\ /|
   | X |
   |/ \|
   .---.

Since the triangles have both vertical and horizontal sides of size
x/WIDTH, the expected coverage is 3/4 (75%) of (x/WIDTH)^2. The
original code, instead, was checking for a coverage of 0.75*x/WIDTH,
as if one of the sides was always 1 unit long.

The image and xlib backends still suffer from some jitter, caused by
the approximation of the actual coverage by means of sampling. For
this reason their references are still considered XFAIL, even though
their result now looks mostly consistent with the expected reference.
2015-04-08 14:32:17 +02:00
Bryce Harrington
b4e218c3e8 Drop the target-specific huge-radial.pdf.*.ref.png images
These two images are mis-rendered (clearly evident from visual
inspection).  By removing them, the test will fall back to the more
general format-specific images, huge-radial.argb32.ref.png and
huge-radial.rgb24.ref.png.

Note that the huge-radial.pdf tests still fail to pass, but the pdiff
looks more sensible.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66218

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2014-10-29 15:45:17 -07:00
Bryce Harrington
82cd66f833 test: Update pixman downscaling 95 reference images
The pixman downscaling "95" tests attempt to rescale a 96x96 pixmap to
95x95.  Ideally the borders between color areas should be sharp, but for
this use case we allow for 1 pixel of blur between the areas as
acceptable.  The choice of what color to use for this blurred region is
not important, and in fact varies from backend to backend.

The old reference images were generated by Krzysztof Kosiński's
downscaling algorithm.  These new images are against the algorithms
written by Bill Spitzak.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2014-10-09 18:28:53 -07:00
Chris Wilson
14df211b9c test: Add whole flipped replays
When investing the symmetry of the raterisation, we want to have a
simple replay of all of the original geometry through a the flipped
recording surface. This reduces the worry about artifacts from the
clipped rendering.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-02 13:08:50 +01:00
Chris Wilson
7aacd81bef test: Refresh reference images for tor rendering changes
(And include a git add missed from commit

ccd48b3464
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Sep 30 14:06:21 2014 +0100

    test: Remove more duplicated reference images

but were mostly invalidated by the rasteriser changes anyway).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-02 08:46:44 +01:00
Chris Wilson
50b41e2145 test: Add a simple rasteriser to check fidelity of edge rendering
In order to check the behaviour of the analytic rasteriser inside tor,
let's compare it against a very simple rasteriser that uses a rectiliner
256x256 sample grid.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-02 00:06:27 +01:00
Chris Wilson
0c42d5c176 test: Add another coverage example demonstrating the seams in tor
References: https://bugs.freedesktop.org/show_bug.cgi?id=84396
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-30 16:15:33 +01:00
Chris Wilson
95e147bfa0 test: Explicitly flip the reference image for recordflip
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-30 14:33:50 +01:00
Chris Wilson
ccd48b3464 test: Remove more duplicated reference images
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-30 14:06:36 +01:00
Chris Wilson
167561f282 tor: Review full-row walker
When updating the quorem between cells, we would lose the overflow
increment as it was only applied locally and not preserved by updating
the quorem.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-30 13:57:05 +01:00