summaryrefslogtreecommitdiff
path: root/perf/cairo-perf.c
Commit message (Collapse)AuthorAgeFilesLines
* Defining Windows version macros in meson.buildFujii Hironori2023-01-131-1/+0
| | | | | | | | | WINVER and _WIN32_WINNT macros were defined in each source files and headers that were including <windows.h>. However, because DirectWrite requires new Windows API, some files included <windows.h> without the version macros. This inconsistency sometimes caused troubles. Define the version macros in meson.build.
* Drop OS/2 supportEmmanuele Bassi2022-02-251-7/+2
| | | | | | | OS/2 support was last built in Cairo 1.12, which was released 10 years ago. Additionally, OS/2 is not supported by Meson.
* perf: Synchronize before stopping the timersChris Wilson2013-01-311-0/+3
| | | | | | | | | | | | | | | | Fixes a regression from commit 2855ff4666922f2c38505414270d47f659b0d499 Author: Andrea Canciani <ranma42@gmail.com> Date: Wed Aug 31 16:42:03 2011 +0200 perf: Reuse cairo-time which dropped the essential call to synchronize when refactoring the code. Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* perf: Get rid of cairo_perf_ticks_per_second()Andrea Canciani2011-09-021-6/+0
| | | | | The cairo_time_from_s() and cairo_time_to_s() functions should be used instead.
* perf: Reuse cairo-timeAndrea Canciani2011-09-021-0/+101
| | | | | Instead of redefining time getters, use the generic one provided by _cairo_time_*.
* [perf] Reorganise cairo-perfChris Wilson2009-09-151-596/+0
| | | | | In preparation to creating a new hub to control performance measuring and reporting, move the current cairo-perf out of the way.
* [perf] Move the calibration to its own functionChris Wilson2009-09-051-30/+41
| | | | Improve code clarity and whatnot.
* [perf] Add a fast-and-sloppy mode to cairo-perf.M Joonas Pihlaja2009-09-051-20/+39
| | | | | | | | A new -f option to cairo-perf reverts to a fast run mode for quick performance overviews. The number of milliseconds each iteration of a test is run for can be overriden using the new CAIRO_PERF_ITERATION_MS environment variable. The default remains 2000 ms/iter.
* Add skia backendVladimir Vukicevic2009-08-291-0/+3
| | | | | | | | | Originally written by Vladimir Vukicevic to investigate using Skia for Mozilla, it provides a nice integration with a rather interesting code base. By hooking Skia underneath Cairo it allows us to directly compare code paths... which is interesting. [updated by Chris Wilson]
* [perf] Match directory namesChris Wilson2009-08-291-3/+11
| | | | | | In order to handle 'cairo-perf-trace benchmark', we need to perform the can_run? test on the directory name as opposed to the individual trace names. Make it so.
* [perf] Calibrate tests to run for at least 2 secondsChris Wilson2009-08-061-8/+31
| | | | | | | | By ensuring that tests take longer than a couple of seconds we eliminate systematic errors in our measurements. However, we also effectively eliminate the synchronisation overhead. To compensate, we attempt to estimate the overhead by reporting the difference between a single instance and the minimum averaged instance.
* [perf] Check outputChris Wilson2009-07-311-0/+19
| | | | | | | | | | Add a CAIRO_PERF_OUTPUT environment variable to cause cairo-perf to first generate an output image in order to manually check that the test is functioning correctly. This needs to be automated, so that we have absolute confidence that the performance tests are not broken - but isn't that the role of the test suite? If we were ever to publish cairo-perf results, I would want some means of verification that the test-suite had first been passed.
* [drm] Add an accelerated image surface.Chris Wilson2009-07-231-1/+4
| | | | | | | | | | | | | | | | | Use the DRM interface to h/w accelerate composition on image surfaces. The purpose of the backend is simply to explore what such a hardware interface might look like and what benefits we might expect. The use case that might justify writing such custom backends are embedded devices running a drm compositor like wayland - which would, for example, allow one to write applications that seamlessly integrated accelerated, dynamic, high quality 2D graphics using Cairo with advanced interaction (e.g. smooth animations in the UI) driven by a clutter framework... In this first step we introduce the fundamental wrapping of GEM for intel and radeon chipsets, and, for comparison, gallium. No acceleration, all we do is use buffer objects (that is use the kernel memory manager) to allocate images and simply use the fallback mechanism. This provides a suitable base to start writing chip specific drivers.
* [gl] Enable GL backend for cairo-perf-traceChris Wilson2009-07-221-1/+3
|
* Merge commit 'anholt/gl'Chris Wilson2009-07-211-0/+1
|\ | | | | | | | | | | | | | | | | Conflicts: boilerplate/Makefile.sources boilerplate/cairo-boilerplate.c build/configure.ac.features src/cairo.h util/cairo-script/Makefile.am
| * Merge commit 'origin/master' into glEric Anholt2009-06-021-17/+24
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Felt like pulling the latest stuff, since I branched back in February. Conflicts: build/configure.ac.features src/cairo.h util/cairo-script/csi-replay.c
| * | [gl] Add basics for GL surface backend using test-fallback as base.Eric Anholt2009-02-051-0/+1
| | |
* | | Export meta-surfaceChris Wilson2009-07-031-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The meta-surface is a vital tool to record a trace of drawing commands in-memory. As such it is used throughout cairo. The value of such a surface is immediately obvious and should be applicable for many applications. The first such case is by cairo-test-trace which wants to record the entire graph of drawing commands that affect a surface in the event of a failure.
* | | [perf] Exclude the xlib-reference target from cairo-perfChris Wilson2009-06-301-1/+2
| | |
* | | [perf] Need to version surface typesChris Wilson2009-06-211-0/+6
| | | | | | | | | | | | | | | | | | As cairo-perf-diff will execute the current cairo-perf against historical revisions, any introduced api must be protect in order to compile on old versions.
* | | Import Qt backend by MozillaVladimir Vukicevic2009-06-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Written by Vladimir Vukicevic to enable integration with Qt embedded devices, this backend allows cairo code to target QPainter, and use it as a source for other cairo backends. This imports the sources from mozilla-central: http://mxr.mozilla.org/mozilla-central/find?text=&kind=text&string=cairo-qpainter renames them from cairo-qpainter to cairo-qt, and integrates the patch by Oleg Romashin: https://bugs.freedesktop.org/attachment.cgi?id=18953 And then attempts to restore 'make check' to full functionality. However: - C++ does not play well with the PLT symbol hiding, and leaks into the global namespace. 'make check' fails at check-plt.sh - Qt embeds a GUI into QApplication which it requires to construct any QPainter drawable, i.e. used by the boilerplate to create a cairo-qt surface, and this leaks fonts (cairo-ft-fonts no less) causing assertion failures that all cairo objects are accounted for upon destruction. [Updated by Chris Wilson] Acked-by: Jeff Muizelaar <jeff@infidigm.net> Acked-by: Carl Worth <cworth@cworth.org>
* | | [boilerplate] Make array of targets const.Chris Wilson2009-06-121-2/+2
| | | | | | | | | | | | Protect the boilerplate targets from unexpected modifications.
* | | [perf] Add a verbose flag for summary output with rawChris Wilson2009-06-021-30/+52
| | | | | | | | | | | | | | | | | | Use 'cairo-perf -v -r' to have both the summary output along with the raw values. This gives a progress report whilst benchmarking, very reassuring with long running tests.
* | | [perf] Exclude similar testing by defaultChris Wilson2009-06-021-2/+3
| | | | | | | | | | | | | | | | | | | | | There are synchronisation issues with similar surfaces (as only the original target surface is synced) which interferes with making performance comparisons. (There still maybe some value should you be aware of the limitations...)
* | | [perf] Benchmark mixing different masks and sourcesChris Wilson2009-06-021-0/+1
| | |
* | | [perf] Add a pure glyphs performance metricChris Wilson2009-06-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use the new API Behdad exposed in 1.8 to precompute a glyph string using Cairo and then benchmark cairo_show_glyphs(). This is then equivalent to the text benchmark but without the extra step of converting to glyphs on every call to cairo_show_text() i.e. it shows the underlying glyph rendering performance.
* | | [perf] Change seperators from '-' to '.'Chris Wilson2009-06-021-4/+4
| |/ |/| | | | | | | This allows the perf tests to use '-' in the name which is easier to read and differentiates with using '_' to separate source and operators.
* | [sdl] Remove new backend.M Joonas Pihlaja2009-02-161-4/+0
| | | | | | | | | | | | | | | | The SDL backend makes invalid assumptions about SDL_Surface locking semantics and doesn't deal correctly with the unpremultiplied pixel format supported by SDL. Removed as per discussion on the mailing list. http://lists.cairographics.org/archives/cairo/2009-February/016595.html
* | [perf] Env variable to ignore similar targets whilst benchmarking.Chris Wilson2009-02-131-0/+3
| | | | | | | | Use CAIRO_TEST_IGNORE_SIMILAR to skip similar targets.
* | [perf] Split can_run? into a separate precondition.Chris Wilson2009-02-131-8/+16
| | | | | | | | Allow tests to skip unnecessary setup when pruning the list of perf cases.
* | [perf] Extend range of testing.Chris Wilson2009-02-131-5/+5
|/ | | | | Primarily to test longer glyph runs, but also test large upper bounds for strokes and fills.
* [perf] Add perf tests to hit rectilinear code paths.M Joonas Pihlaja2008-12-061-0/+1
| | | | | | | | These tests look at the differences in code paths hit by filling paths that are rectilinear (or not) and pixel aligned (or not) with the even-odd and non-zero fill rules. The paths are not simple, so they don't hit the special case quad/triangle tessellator.
* [perf] Explicitly test rendering a path with lots of intersections.M Joonas Pihlaja2008-12-061-0/+1
| | | | | | | We don't have one just for this purpose. The only other path with many intersections that gets actually rendered is zrusin-another, but that might be sped up in the future (say by identifying collinearities up front or something like that.)
* [perf] Fix SDL compilation for MacOS XPaolo Bonzini2008-11-261-0/+4
| | | | | | | | | | | | | The attached patch makes the SDL tests compile under Mac OS X. The problem is: 1) that <SDL_main.h> should be included in files that define the main function for SDL Mac OS X programs (this is not true with the upcoming SDL 1.3 release). 2) that -lSDLmain, because it is statically linked, needs the Cocoa framework in the LDADD of the main program. Again, 1.3 will not require this.
* [perf/pythagoras_tree] Another fractal.Chris Wilson2008-11-191-0/+1
| | | | Test lots of rectangles and recursion path construction.
* [perf/dragon] Add a dragon curve perf case.Chris Wilson2008-11-191-0/+1
| | | | | | Inspired by http://labs.trolltech.com/blogs/2007/08/31/rasterizing-dragons/ and http://en.wikipedia.org/wiki/Dragon_curve, add a performance test case to measure drawing this space-filling fractal curve.
* Restore the ability to choose the internal font.Chris Wilson2008-10-301-0/+1
| | | | | | | | | | | | | | Behdad wants to include the feature with 1.10, so we enable it as early as possible in 1.9 dev cycle to generate as much feedback as possible. The first change is to use "<cairo>" as being a name unlikely to clash with any real font names. This reverts commits: a824d284be23793a5c48b9ae833dcb7b2d5fff80, 292233685534aed712dfd45e8ccf498b792ce496, e0046aaf417a61da008dc6374871fa3687ba94ab, f534bd549e1e2283735d1eabb60c015a5949a735.
* Remove twin perf case.Carl Worth2008-10-291-1/+0
| | | | | | | | | This performance test relied on the recently-removed ability to select the internal twin-based font family with a name of "cairo". Presumably, we'll want to bring this performance case back when some other means of requesting that font face is added.
* Twin perf caseChris Wilson2008-10-221-0/+1
|
* [perf] A crude tool to visualise performance changes across a series.Chris Wilson2008-10-191-0/+1
| | | | | | Generate a cairo-perf-diff graph for a series of commits in order to be able to identify significant commits. Still very crude, but minimally functional.
* [perf] Add composite performance test.Björn Lindqvist2008-10-081-0/+1
| | | | | | | | Add a new test case to Cairo for checking the performance of Cairo's equivalent to GDK's gdk_pixbuf_composite_color() operation. That is an operation that happens to be extremely useful when viewing or editing transparent images so I think it is important that it is as fast as possible.
* [perf] Add rounded rectangle perf case.Chris Wilson2008-09-281-0/+1
| | | | | | | | Add the performance test case to compare the speed of filling a rounded rectangle (one with camphered corners) as opposed to an ordinary rectangle. Since the majority of the pixels are identical, ideally the two cases would take similar times (modulo the additional overhead in the more complex path).
* Move _GNU_SOURCE declarations to where it's usedBehdad Esfahbod2008-09-021-0/+2
| | | | Such that we don't rely on more GNU extensions accidentally.
* [perf] Continue testing after we fail to create a surface.Chris Wilson2008-08-191-9/+4
| | | | | Sometimes we cannot create a surface because it is larger than the screen. Ignore these non-fatal errors and move on to the next performance case.
* [test] Preparatory work for running under memfault.Chris Wilson2008-08-131-4/+7
| | | | | | | | | | | | | | | | | | | | 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/.
* [cairo-perf] Only allocate arrays once.Chris Wilson2008-06-131-16/+14
| | | | | Store the array of times on the cairo_perf_t context to avoid reallocating it for every perf-case.
* [test] Handle TEST_CONTENT_COLOR_ALPHA_FLATTENED similar surfaces.Chris Wilson2008-04-111-2/+4
| | | | | | | Convert the boilerplate specific flattened content value to the ordinary CAIRO_CONTENT_COLOR_ALPHA for use with cairo_push_group_with_content() - otherwise cairo rightfully flags an error and the test harness decides that the similar surface is not available.
* Some fixes and improvements to the Win32 buildAzar@.(none)2008-02-061-5/+2
|
* [cairo-perf] Run performance tests over similar surfaces as well.Chris Wilson2007-10-201-46/+75
| | | | | | | Immediately repeat the performance test against a similar surface to ensure that they introduce no regressions. Primarily introduced to sanity check the change to use XShmPixmaps instead of XPixmaps in the xlib backend, but it should be generally useful.
* [cairo-perf] Blacklist xlib-fallback.Chris Wilson2007-08-241-0/+8
| | | | | Do not try and create non-Render xlib surfaces as they explicitly do not support performance testing.