summaryrefslogtreecommitdiff
path: root/test/imagediff.c
Commit message (Collapse)AuthorAgeFilesLines
* Drop the conditional inclusion of config.hEmmanuele Bassi2021-05-011-2/+0
| | | | | | | | | | | | We *always* generate this file, and we depend on its existence. The idea behind HAVE_CONFIG_H was being able to include random files from different projects, back in a time where "libraries" were literally just random files instead of actual shared objects. Since we're not in the '80s any more, and our build system(s) define HAVE_CONFIG_H *and* generate the config.h header file, we don't need a conditional guard around its inclusion.
* [test] Fix compilation of imagediff.Chris Wilson2008-11-041-0/+17
| | | | imagediff broke once again.
* [TEST] make imagediff work againBenjamin Otte2008-10-091-4/+5
| | | | It seems to have bitrotten
* [test] Do not include "xmalloc.h" directlyBehdad Esfahbod2008-09-041-1/+0
| | | | Not needed, it's renamed and included by boilerplate directly.
* [test/bufferdiff] Move unused code.Chris Wilson2008-08-201-1/+216
| | | | | Only imagediff calls png_diff, so it makes sense to move that function out of the cairo-test and into the utility.
* [test] Avoid redundant writes/reads of test surfaces via png.Chris Wilson2008-08-181-1/+1
| | | | | | | | | As Behdad suggested, we can dramatically speed up the test suite by short-circuiting the write to a png file, only to then immediately read it back in. So for the raster based surfaces, we avoid the round-trip through libpng by implementing a new boilerplate method to directly extract the image buffer from the test result. A secondary speedup is achieved by caching the most recent reference image.
* [test] Preparatory work for running under memfault.Chris Wilson2008-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | In order to run under memfault, the framework is first extended to handle running concurrent tests - i.e. multi-threading. (Not that this is a requirement for memfault, instead it shares a common goal of storing per-test data). To that end all the global data is moved into a per-test context and the targets are adjusted to avoid overlap on shared, global resources (such as output files and frame buffers). In order to preserve the simplicity of the standard draw routines, the context is not passed explicitly as a parameter to the routines, but is instead attached to the cairo_t via the user_data. For the masochist, to enable the tests to be run across multiple threads simply set the environment variable CAIRO_TEST_NUM_THREADS to the desired number. In the long run, we can hope the need for memfault (runtime testing of error paths) will be mitigated by static analysis. A promising candidate for this task would appear to be http://hal.cs.berkeley.edu/cil/.
* test: Ignore single-bit errors for SVG backend.Carl Worth2006-08-311-5/+14
| | | | | | | | | | | | | | The interface of the various buffer/image_diff functions is improved to provide the maximum pixel difference in addition to the number of pixels that differ. This value can then be used to compare against a per-backend tolerance. Currently I've set the SVG backend's tolerance to 1 to handle some issues we're currently seeing of single-bit differences on different systems, (but we're not exactly sure why yet). Also I improved the image_diff routines to properly report a status value on failure rather than the bogus value of -1 for pixels_changed.
* boilerplate: Remove custom read/write-png code in favor of using cairo surfacesCarl Worth2006-08-311-2/+0
| | | | Also combine image_diff and image_diff_flattened into a single function
* Remove all remaining trailing whitespace.Carl Worth2006-06-061-1/+1
| | | | | | | | | | | This patch was produced with the following (GNU) sed script: sed -i -r -e 's/[ \t]+$//' run on all *.[ch] files within cairo. Note that the above script would have also created all the changes from the previous commits to remove trailing whitespace.
* Remove trailing whitespace from lines that look like comments.Carl Worth2006-06-061-1/+1
| | | | | | | | | | This patch was produced with the following (GNU) sed script: sed -i -r -e '/^[ \t]*\/?\*/ s/[ \t]+$//' run on all *.[ch] files within cairo, (though I manually excluded src/cairo-atsui-font.c which has a code line that appears as a comment to this script).
* Augment test framework to test everything under device offsets as well.Vladimir Vukicevic2006-05-031-34/+11
| | | | | | [With this change, two tests with gradients exhibit subtle differences under device offsets. I don't think we actually care about them though. -cworth]
* Remove redeundant -rgb24-ref.png images.Carl Worth2006-04-261-6/+9
| | | | | | In several cases the -rgb24 reference images were identical to the -ref images. So we change the logic to find the latter if the former doesn't exist, and then we remove the redundant images.
* Fix to return non-zero status on error.Carl Worth2005-04-071-1/+1
|
* More _/- renames in the test directory.Carl Worth2005-03-291-3/+3
|
* test/imagediff.cCarl Worth2005-01-251-0/+84
Add new testsvg script and accompanying imagediff program, (for interim SVG-based test suites while we wait for the standard cairo test suite to mature). Split buffer_diff out into its own file for the purpose of imagediff.