summaryrefslogtreecommitdiff
path: root/boilerplate/cairo-boilerplate-test-surfaces.c
Commit message (Collapse)AuthorAgeFilesLines
* Retire dummy cairo-version.h header to fix meson subproject buildTim-Philipp Müller2020-09-291-2/+0
| | | | | | | | | | | | | | It was originally added to make bisecting easier, but has outlived its usefuleness now. Going forward we'll have just a single cairo-version.h header file, the one with the real version numbers. This is needed to fix the case where cairo is being built as a Meson subproject, but also simplifies things in general. Fixes #421
* boilerplate: Remove unused thread id parameterAndrea Canciani2011-11-121-9/+0
| | | | | The thread id is not used anymore (it is always == 0), so it can be removed.
* boilerplate: Skip testing of null surfacesChris Wilson2011-09-261-0/+9
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* test: Use the test-traps as the reference images for xlib/xcbChris Wilson2011-09-161-1/+1
| | | | | | | | | The test-traps provides a reference implementation of the traps-compositor as used by xlib, so we can use it to generate the reference images as well. (Of course checking that test-traps is itself correct and only differs in the renderer! ;-) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* test: Complete set of baseline reference imagesChris Wilson2011-09-151-2/+2
| | | | | | test-base basically implements rendering ala cairo-1.0 and so serves as a useful baseline for comparing enhancements and to regression test the core libraries.
* Introduce a new compositor architectureChris Wilson2011-09-121-113/+238
| | | | | | | | | | | | | | | | | | Having spent the last dev cycle looking at how we could specialize the compositors for various backends, we once again look for the commonalities in order to reduce the duplication. In part this is motivated by the idea that spans is a good interface for both the existent GL backend and pixman, and so they deserve a dedicated compositor. xcb/xlib target an identical rendering system and so they should be using the same compositor, and it should be possible to run that same compositor locally against pixman to generate reference tests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> P.S. This brings massive upheaval (read breakage) I've tried delaying in order to fix as many things as possible but now this one patch does far, far, far too much. Apologies in advance for breaking your favourite backend, but trust me in that the end result will be much better. :)
* boilerplate: Introduce create_similar hookChris Wilson2011-06-021-0/+8
| | | | | | | | | | | | | | A deficiency of cairo-perf-trace is that it currently always uses similar surfaces for new surface which are kindly cleared by Cairo. This does not accurately reflect the captured trace and introduces large bandwidth overheads that distort the profiles. So we introduce a new boilerplate hook so that the targets can create a surface without incurring additional overheads. [Fixes the broken partial commit of bf1b08d066e.] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* boilerplate: Add a describe vfuncBenjamin Otte2010-07-031-8/+8
| | | | | | | | | This function is supposed to describe the backend in use. The describe function is optional - and therefore initialized as NULL everywhere. Note: It is well known that the xlib backend uses X. What is not known is what version the server supports or what graphics card it is running on. That is the information the describe vfunc is supposed to provide.
* whitespace: Fixup formal arguments and tabs in boilerplate/ and perf/.M Joonas Pihlaja2010-06-241-50/+50
| | | | | Ran a script to align the formal parameters of functions and collapse spaces to tabs in code.
* boilerplate: Create an image16 targetChris Wilson2010-03-271-9/+12
| | | | | | In order to exercise the newly restored r5g6g5 support, we need to create an appropriate surface and feed it through the test and performance suites.
* [meta] Rename cairo_meta_surface_t to cairo_recording_surface_t.M Joonas Pihlaja2009-10-221-1/+1
| | | | | | | The new name is more descriptive than the rather opaque meta surface. Discussed with vigour on the mailing list and #cairo: http://lists.cairographics.org/archives/cairo/2009-July/017571.html
* [boilerplate] Runtime library checkChris Wilson2009-08-291-0/+8
| | | | | | | For the purposes of benchmarking it is useful to run cairo-perf against a different library from the one it was compiled against. In order to do so, we need to check that the runtime library contains the required entry points for our targets - which we can check by using dlsym.
* [boilerplate] Fix compilation against old revisions (as old as 1.9.2!)Chris Wilson2009-07-241-12/+19
|
* Remove clip handling from generic surface layer.Chris Wilson2009-07-231-60/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handling clip as part of the surface state, as opposed to being part of the operation state, is cumbersome and a hindrance to providing true proxy surface support. For example, the clip must be copied from the surface onto the fallback image, but this was forgotten causing undue hassle in each backend. Another example is the contortion the meta surface endures to ensure the clip is correctly recorded. By contrast passing the clip along with the operation is quite simple and enables us to write generic handlers for providing surface wrappers. (And in the future, we should be able to write more esoteric wrappers, e.g. automatic 2x FSAA, trivially.) In brief, instead of the surface automatically applying the clip before calling the backend, the backend can call into a generic helper to apply clipping. For raster surfaces, clip regions are handled automatically as part of the composite interface. For vector surfaces, a clip helper is introduced to replay and callback into an intersect_clip_path() function as necessary. Whilst this is not primarily a performance related change (the change should just move the computation of the clip from the moment it is applied by the user to the moment it is required by the backend), it is important to track any potential regression: ppc: Speedups ======== image-rgba evolution-20090607-0 1026085.22 0.18% -> 672972.07 0.77%: 1.52x speedup ▌ image-rgba evolution-20090618-0 680579.98 0.12% -> 573237.66 0.16%: 1.19x speedup ▎ image-rgba swfdec-fill-rate-4xaa-0 460296.92 0.36% -> 407464.63 0.42%: 1.13x speedup ▏ image-rgba swfdec-fill-rate-2xaa-0 128431.95 0.47% -> 115051.86 0.42%: 1.12x speedup ▏ Slowdowns ========= image-rgba firefox-periodic-table-0 56837.61 0.78% -> 66055.17 3.20%: 1.09x slowdown ▏
* Remove the defunct test-meta surfaceChris Wilson2009-07-041-38/+0
| | | | | Replace the internal test-meta surface will the freshly exported, real meta-surface.
* [boilerpate] Move target definition to backends.Chris Wilson2009-07-041-11/+106
| | | | | | | | | | | By moving the backend target definition out of the massive amlagamated block in cairo-boilerplate.c and into each of the cairo-boilerplate-backend.c, we make it much easier to add new targets as the information need only be entered in a single file and not scattered across three. However, updating the target interface means trawling across all the files -- except given that I found it difficult maintaining the single massive array I do not see this as an increase in the maintenance burden.
* [boilerplate] Only include null-test-surface >= cairo-1.9.3Chris Wilson2009-06-301-1/+9
|
* [test] Add group-unalignedChris Wilson2009-06-271-20/+20
| | | | | | | | | | | Test case for: Bug 22441 -- Unexpected shift with push_group and pop_group https://bugs.freedesktop.org/show_bug.cgi?id=22441 This is a test that demonstrates the error in the pdf backend when using groups on surfaces with non-integer sizes. In order to create such a surface, we need to update the boilerplate to use doubles instead of integers when specifying the surface size.
* Expose _cairo_null_surface_create() via a test surfaceChris Wilson2009-06-151-0/+16
| | | | | | | Using a null surface is a convenient method to measure the overhead of the performance testing framework, so export it although as a test-surface so that it will only be available in development builds and not pollute distributed libraries.
* [test] Create a new fallback surface to exercise 16-bit paths.Chris Wilson2009-05-051-0/+16
| | | | | | Add a variation of test-fallback-surface that forces the use of a 16-bit pixman format code instead of the standard 32-bit types. This creates an image surface akin to the fallbacks used with low bit-depth xservers.
* Automate error checking for fallback-resolution.Chris Wilson2008-09-281-1/+6
| | | | | | | | | | | For this we extend the boilerplate get_image() routines to extract a single page out of a paginated document and then proceed to manually check each page of the fallback-resolution test. (Well that's the theory, in practice SVG doesn't support multiple pages and so we just generate a new surface for each resolution. But the infrastructure is in place so that we can automate other tests, e.g. test/multi-pages.)
* [test] Avoid redundant writes/reads of test surfaces via png.Chris Wilson2008-08-181-7/+51
| | | | | | | | | 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-11/+24
| | | | | | | | | | | | | | | | | | | | 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/.
* [boilerplate-test-surfaces] Check show page for errors.Chris Wilson2007-10-101-0/+3
| | | | | Check that cairo_surface_show_page() did not generate any errors before reading back the image buffer and saving it as a png.
* Export cairo_surface_{copy,show}_pageVladimir Vukicevic2007-09-111-4/+1
| | | | | | | This patch adds cairo_surface_copy_page and cairo_surface_show_page as public methods, leaving the previous cairo_show_page variants as shorthands. copy_page/show_page are specific to the surface, not to the context, so they need to be surface methods.
* [boilerplate] Add cairo_boilerplate_format_from_contentBehdad Esfahbod2007-04-201-12/+1
|
* [boilerplate] Strip test-surfaces boilerplate into ↵Behdad Esfahbod2007-04-201-0/+170
cairo-boilerplate-test-surfaces*