summaryrefslogtreecommitdiff
path: root/test/xlib-surface.c
Commit message (Collapse)AuthorAgeFilesLines
* test: fix include order for AIX, bug#89354Michael Haubenwallner2015-03-051-1/+2
|
* xlib: Replace obsolete disable-xrender with shiny new device debug interfaceChris Wilson2012-02-221-20/+3
| | | | | | As prototyped with xcb. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* test-suite: add image_diff_is_failure() functionBenjamin Otte2010-04-281-2/+2
| | | | | This cleans the code and fixes a boolean logic error where this check was done manually.
* [test] Build test suite into single binary.Chris Wilson2008-10-311-17/+19
| | | | | | | | | Avoid calling libtool to link every single test case, by building just one binary from all the sources. This binary is then given the task of choosing tests to run (based on user selection and individual test requirement), forking each test into its own process and accumulating the results.
* [test] Set CAIRO_TEST_UNTESTED to 77Chris Wilson2008-08-131-9/+9
| | | | | 77 is the magic exit code used by automake to indicate a skipped test, so by using it we can get a slightly more informative test log.
* [test] Export a function to check whether a target is enabled.Chris Wilson2008-08-131-0/+4
| | | | | | Allow individuals tests to check whether a test target is enabled - useful for those tests that circumvent cairo_test() and perform feature testing.
* [test] Preparatory work for running under memfault.Chris Wilson2008-08-131-20/+20
| | | | | | | | | | | | | | | | | | | | 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/get-xrender-format.c] Don't fail if DISPLAY is not setBehdad Esfahbod2008-08-111-1/+1
|
* [test/xlib-surface] Check for mismatching Visuals and XRenderPictFormatsChris Wilson2008-04-081-0/+63
| | | | | Vladimir Vukicevic reported that surfaces were being created with mismatching Visuals and XRenderPictFormats - and demonstated here.
* [test/xlib-surface] Zero pixel buffers before use.Chris Wilson2008-04-081-4/+20
| | | | | As we only use RGB24 surface data the alpha channel is undefined, so zero it to prevent valgrind warnings.
* [cairo-xlib] Fixup --disable-xlib-xrenderChris Wilson2008-01-151-1/+0
| | | | | Fixup the headers and boilerplate to compile and run correctly when configured with --disable-xlib-xrender.
* [xlib] Get rid of _cairo_xlib_test_disable_renderBehdad Esfahbod2007-04-211-3/+5
| | | | in favor of cairo_boilerplate_xlib_surface_disable_render.
* Augment cairo_test_init with cairo_test_fini to avoid leakCarl Worth2007-03-021-19/+13
| | | | | | Without this, any tests that were using cairo_test_init rather than cairo_test would end up leaking a FILE* for the log file. So this keeps valgrind much more happy with the test suite.
* test: Simplify buffer_diff by handling device offset in advanceCarl Worth2006-12-121-4/+0
| | | | | | | | 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.
* test: Ignore single-bit errors for SVG backend.Carl Worth2006-08-311-33/+42
| | | | | | | | | | | | | | 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.
* More test suite infrastructure improvements:Behdad Esfahbod2006-07-111-1/+1
| | | | | | | | | | | | | | | | | - Remove cairo_test_expect_failure. cairo-test.c now checks env var CAIRO_XFAIL_TESTS to see if the running test is expected to fail. The reason for expected failure is appended to the test description. - Test description is written out. - Failed/crashed tests also write a line out to stderr (in red), so one can now redirect stdout to /dev/null to only see failures. - cairo_test() has been changed to not take the draw function anymore, instead, draw function is now part of the test struct. - "make check" doesn't allow limiting backends to test using env var anymore. To limit backends to test, one should use the TARGETS variable on the make command line. - "make check-valgrind" now writes its log to valgrind-log instead of valgrind.log, to not interfere with test log file processing.
* Prefix "cairo_*_test_*" symbols with underscore.Behdad Esfahbod2006-06-291-1/+1
|
* Surface size getters for xlibRobert O'Callahan2006-06-251-1/+6
| | | | | | When accessing the underlying drawable etc of an xlib surface, it is also helpful to be able to get the width and height without a server round trip. This patch provides those functions.
* Remove extraneous whitespace from "blank" lines.Carl Worth2006-06-061-9/+9
| | | | | | | | This patch was produced with the following (GNU) sed script: sed -i -r -e 's/^[ \t]+$//' run on all *.[ch] files within cairo.
* cairo-xlib-test: Rename cairo_test_xlib function prefix to cairo_xlib_testCarl Worth2006-05-241-1/+1
|
* Augment test framework to test everything under device offsets as well.Vladimir Vukicevic2006-05-031-0/+4
| | | | | | [With this change, two tests with gradients exhibit subtle differences under device offsets. I don't think we actually care about them though. -cworth]
* use the newly added buffer_diff_noalpha for comparing buffers of ↵Jeff Muizelaar2005-08-051-12/+12
| | | | CAIRO_FORMAT_RGB24.
* New public header file.Carl Worth2005-08-011-0/+2
| | | | | | | | | | New function to reset all static data (eg. caches) to their initial state. Fix check-valgrind target to depend on the 'all' target. Add check for a new, proposed, XrmFinalize function. Add cairo-debug.c. Move the definition of CAIRO_BEGIN_DECLS to cairo-features.h so that it can be shared between public header files, and so that it doesn't clutter cairo.h Implement reset_static_data in all modules as required. Call cairo_debug_reset_static_data and FcFini so that we can have all tests be valgrind-clean with respect to memory leaks and still-reachable data.
* Fix to accept a cairo_pattern_t rather than a cairo_surface_t as the primary ↵Carl Worth2005-07-141-0/+4
| | | | | | | | argument. Track change in _cairo_pattern_release_surface and also pass the appropriate pattern for each acquired surface. The previous backend mismatch was causing memory leaks. Remove stale comment. Add missing fclose to keep valgrind happy about memory leaks.
* Rework of cairo_xlib_surface create functions by Keith Packard:Carl Worth2005-05-171-3/+7
| | | | | | Add cairo_xlib_surface_create_with_render_format. Reduce Xlib constructors down to two simple forms. Add width, height to constructors and eliminate any synchronous size queries from the implementation. Update to match new cairo_xlib_surface_t create functions.
* Cleanup output a bit, move verbose messages to test-specific log file.Carl Worth2005-05-141-13/+18
|
* src/cairo-xlib-surface.c src/cairo-xlib.h doc/public/cairo-sections.txt: ↵Owen Taylor2005-05-131-0/+260
Drop the _for_pixmap() and _for_window() out of the create functions and use some lazy cleverness to sniff the information out as needed. src/cairo-xlib-surface.c src/cairo-xlib-test.h Makefile.am: add cairo_test_xlib_disable_render() to turn off RENDER for tests. Test various different types of Xlib surface creation. Remove left-over include of Xrender.h.