Commit graph

721 commits

Author SHA1 Message Date
Brian Ewins
8368fa2fcf [test/text-rotate] Use the same text for measuring and printing 2006-12-23 15:44:16 -05:00
Carl Worth
c08bd4ec37 Ignore another test case binary 2006-12-23 00:03:31 -08:00
Carl Worth
ba531642f7 Add optimization for rectilinear stroke
This custom stroking code allows backends to use optimized region-based
drawing operations for rectilinear strokes. This results in a 5-25x
performance improvement when drawing rectilinear shapes:

image-rgb          box-outline-stroke-100 0.18 -> 0.01: 25.58x speedup
████████████████████████▋
image-rgba         box-outline-stroke-100 0.18 -> 0.01: 25.57x speedup
████████████████████████▋
 xlib-rgb          box-outline-stroke-100 0.49 -> 0.06:  8.67x speedup
███████▋
 xlib-rgba         box-outline-stroke-100 0.22 -> 0.04:  5.39x speedup
████▍

In other words, using cairo_stroke instead of cairo_fill to draw the
same shape was 5-15x slower before, but is 1.2-2x faster now.
2006-12-22 17:59:20 -08:00
Carl Worth
b118911853 Put ft-text-vertical-layout-type1 back on the XFAIL list
I must not have the right font available, (test result is coming out
looking like the result of ft-text-vertical-layout-type3, Vera?).

We should switch this test to load a bundled font, (should do that for
all font-using tests, too).
2006-12-22 17:59:20 -08:00
Carl Worth
9d2d3b95e3 Add new rectilinear-stroke test
This is in preparation for an optimized implementation of cairo_stroke
for rectilinear paths.
2006-12-22 17:59:20 -08:00
Behdad Esfahbod
344901a1a1 [test] Fix typo in test comment, again 2006-12-20 18:15:22 -05:00
Carl Worth
267afe7be3 test/.gitignore: Ignore binarries for some recently added tests 2006-12-18 16:05:42 -08:00
Behdad Esfahbod
c6ec6ed696 [tests/ft-text-vertical-layout-type3] Remove comment that this emits Type3 font
This test used to be named -truetype, which reflected the type of font used in
the test, in contrast to the -type1 test that uses a Type1 font.  However, we
renamed this test to -type3 to emphasize the fact that a TrueType subset is
not emitted for vertical fonts and a Type3 fallback font is generated.

Now things have changed: we try generating a Type1 fallback font which is what
is happening for this test.  Moreover, the -typ1 test also is generating a
Type1 fallback font since the Type1 subset font is not useful for vertical
fonts.
2006-12-17 18:42:05 -05:00
Behdad Esfahbod
50efd71935 [type1-subset] Return UNSUPPORTED for vertical fonts
This fixes the last problem with vertical fonts in PS/PDF.  As such, remove
ft-text-vertical-layout-type1 test from XFAIL and add PS-specific ref image
to pass.
2006-12-17 18:37:01 -05:00
Behdad Esfahbod
0bea2ce7f7 [pdiff] Define _GNU_SOURCE to get correct symbols out of <math.h>
math.h does not define __USE_ISOC99 otherwise.
2006-12-17 14:32:08 -05:00
Behdad Esfahbod
2ca6a767ee [pdiff] Don't use float math functions if not using gcc with C99
The float version of many math functions were introduced in C99, and were
causing compile failure on systems like OS X.  We now define them to their
double variant if __USE_ISOC99 is not defined.  We may want to expand it later
to cover non-gcc compilers too, but since this is pdiff only, it's not really
important.
2006-12-17 14:24:57 -05:00
Behdad Esfahbod
294d1a3c4e [test] Add ft-text-vertical-layout-type3-ps-argb32-ref.png
The PS output for ft-text-vertical-layout-type3 looks correct, except for some
antialiasing mismatch.  Ading ref image to fix this, and so, remove the test
from XFAIL.
2006-12-17 01:07:41 -05:00
Behdad Esfahbod
cab3f84ad3 [test] Fix typo in test comment 2006-12-16 18:48:59 -05:00
Behdad Esfahbod
57589a9049 [pdiff] Use CAIRO_CFLAGS, to make sure warnings are enabled 2006-12-16 18:18:47 -05:00
Behdad Esfahbod
8f2ad0affd [pdiff] Fix compiler warnings, that were causing crashes 2006-12-16 18:16:46 -05:00
Carl Worth
8b31038b9f Fix a couple of more stale images holding up 'make distcheck' 2006-12-14 10:16:34 -08:00
David Turner
e9bef30d2b Optimize gradient computations
We update the test suite reference images where needed, (pdiff
avoided a few, but most still needed updating). We take advantage
of the need for new reference images to shrink some of the giant
tests to speed them up a bit.

This optimization provides a 2x improvement in linear gradient
generation performance (numbers from an x86 laptop):

image-rgb    paint_linear_rgba_source-512 26.13 -> 11.13: 2.35x speedup
█▍
image-rgb    paint_linear_rgba_source-256  6.47 ->  2.76: 2.34x speedup
█▍
image-rgba      paint_linear_rgb_over-256  6.51 ->  2.86: 2.28x speedup
█▎
image-rgb      paint_linear_rgba_over-512 28.62 -> 13.70: 2.09x speedup
█▏
image-rgba       fill_linear_rgb_over-256  3.24 ->  1.94: 1.66x speedup
▋
image-rgb     stroke_linear_rgba_over-256  5.68 ->  4.10: 1.39x speedup
▍
2006-12-14 09:27:45 -08:00
Carl Worth
af9cce6aa2 Fix 'make distcheck' after recent file removals 2006-12-14 09:18:26 -08:00
Carl Worth
4888a02666 test: Remove ps-specific reference images no longer needed thanks to pdiff 2006-12-14 07:58:02 -08:00
Carl Worth
5e0818d79d test: Remove svg-specific reference images no longer needed thanks to pdiff
This doesn't get rid of all the SVG reference images, but it
does clean up quite a few.
2006-12-14 07:58:02 -08:00
Carl Worth
c426e71141 Hook up pdiff to the test suite now that its written in C 2006-12-14 07:58:02 -08:00
Carl Worth
305cbd8e71 pdiff: Remove casts since we're out of the land of X++ where void* is stupidly broken 2006-12-14 07:58:01 -08:00
Carl Worth
f175b23559 pdiff: Rename everything to .c and fix an last littele C++ isms.
The only things we had missed were a few new/delete pairs, and some
obvious header file fixups, (like not doing <string>).
2006-12-14 07:58:01 -08:00
Carl Worth
18a4fa448f pdiff: Replace CompareArgs class with args_t struct
This gets rid of nearly the last vestiges of C++ from the pdiff code.
2006-12-14 07:58:01 -08:00
Carl Worth
871aba6c80 pdiff: Fix return value from perceptualdiff program 2006-12-14 07:58:01 -08:00
Carl Worth
2174ee2475 pdiff: Remove all uses of std::string 2006-12-14 07:58:01 -08:00
Carl Worth
91b156b82e pdiff: Remove RGBAImage classes now that we're just using cairo image surfaces 2006-12-14 07:58:01 -08:00
Carl Worth
4c812c38e4 pdiff: Remove hideous C++ reference passing 2006-12-14 07:58:01 -08:00
Carl Worth
2457756afd pdiff: Remove intermingled statements and declarations 2006-12-14 07:58:01 -08:00
Carl Worth
e947f5a4bd pdiff: Add .gitignore for perceptualdiff binary 2006-12-14 07:58:01 -08:00
Carl Worth
bb4d4dc771 pdiff: Remove old, unused Yee_Compare interface 2006-12-14 07:58:01 -08:00
Carl Worth
53c3a2f75b pdiff: Rewrite main program to use cairo-based pdiff_compare interface 2006-12-14 07:58:01 -08:00
Carl Worth
358645d6eb pdiff: Rip out unused ImgDiff code, (dropping -output option) 2006-12-14 07:58:00 -08:00
Carl Worth
4438fb6dca pdiff: Move function that depends on command-line argument class to same file as main 2006-12-14 07:58:00 -08:00
Carl Worth
c7379fcea4 pdiff: Rewrite Laplacian pyramid code from C++ to C 2006-12-14 07:58:00 -08:00
Carl Worth
29456d3865 pdiff: Convert C++-style comments to good old-fashioned C-style comments 2006-12-14 07:58:00 -08:00
Carl Worth
34a6af3c55 pdiff: Delete all trailing whitespace. 2006-12-14 07:58:00 -08:00
Carl Worth
d421a856d0 pdiff: Re-indent all code
I've given up on trying to preserve the old code formatting
for compatibility. We're not planning on augmenting the algorithm
itself, just integrating it into cairo. So I don't expect to
make changes that we'll be all that interested in pushing
upstream.
2006-12-14 07:58:00 -08:00
Carl Worth
4f6611ef6c pdiff: Fix line endings 2006-12-14 07:58:00 -08:00
Carl Worth
ccb3a6c4de pdiff: Compile pdiff algorithm as a libtool convenience library
The convenience library provides a pdiff_compare function with a
cairo interface into the perceptual diff algorithm.
2006-12-14 07:58:00 -08:00
Carl Worth
55f776876d test: Rework buffer_diff interface as new compare_surfaces
This is a slightly kinder interface that accepts cairo_image_surface_t
pointers rather than pointers to the raw image data and width, height,
stride. This brings us closer to hooking up the pdiff code.
2006-12-14 07:57:59 -08:00
Carl Worth
0d7870b6bf pdiff: Teach pdiff code to accept cairo image surfaces
This is a second small step in enabling cairo's test suite and the
pdiff code to start working together.
2006-12-14 07:57:59 -08:00
Carl Worth
41e01d95ed pdiff: Factor out a comparison function that doesn't read the 'args' structure
This is one small step in "libifying" pdiff which will make it
easier to share this code inside cairo's test suite.
2006-12-12 03:13:38 -08:00
Carl Worth
b50b8db6d7 test: Simplify buffer_diff by handling device offset in advance
In a manner similar to flattening in advance, we now extract the sub-
surface of interest (when testing with device offsets) before calling
into the buffer_diff functions. This allows these functions to accept
a single stride value once again instead of one for each of the three
images.
2006-12-12 02:17:19 -08:00
M Joonas Pihlaja
fd03991a6a test: random-intersections
The purpose of this test case is to help make
sure that changes to the trapezoid generation or
intersection computation in the tessellator
don't break it.
2006-12-07 04:46:07 +02:00
M Joonas Pihlaja
6301f92d2a Rework the in-fill-empty-trapezoid test to not use the cairo_test() framework.
As suggested by Behdad Esfahbod, we can not use the cairo_test() framework
when it is getting in the way.  The test itself doesn't depend on any
particular backend.

http://lists.freedesktop.org/archives/cairo/2006-December/008809.html
2006-12-07 02:31:10 +02:00
M Joonas Pihlaja
c13a1a2ed0 Replace point sampling in the fill-degenerate-sort-order with rendering.
Clean up the test to not even check the ps backend as per:

http://lists.freedesktop.org/archives/cairo/2006-December/008806.html
2006-12-07 02:31:10 +02:00
M Joonas Pihlaja
565a715d11 Change license of tessellator tests to the MIT license.
The blurb for the fill-degenerate-sort-order, fill-missed-stop and
in-fill-empty-trapezoid tests changed to this one:

http://www.opensource.org/licenses/mit-license.php

c.f. http://lists.freedesktop.org/archives/cairo/2006-December/008806.html
2006-12-07 02:31:10 +02:00
Behdad Esfahbod
16c0db0d68 [test] Break the "make clean" target into serveral rm calls
Some systems cannot handle very long list of arguments.  Carl was hitting this
for "make clean".  Break it out into several rm calls triggered by the
clean-local target.
2006-12-06 19:03:03 -05:00
Behdad Esfahbod
3cf9947795 [.gitignore] Add big-trap 2006-12-06 19:03:02 -05:00