summaryrefslogtreecommitdiff
path: root/boilerplate
Commit message (Collapse)AuthorAgeFilesLines
* Introduce cairo_mime_surface_tChris Wilson2011-08-151-0/+10
| | | | | | | | | | | The mime surface is a user-callback surface designed for interfacing cairo with an opaque data source. For instance, in a web browser, the incoming page may be laid out and rendered to a recording surface before all the image data has finished being downloaded. In this circumstance we need to pass a place holder to cairo and to supply the image data later upon demand. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* script: enable by defaultChris Wilson2011-08-141-1/+1
| | | | | | | I'm willing to make this a supported backend as I find it to be an invaluable debugging tool... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Introduce cairo_surface_observer_t for performance analysisChris Wilson2011-08-141-0/+10
| | | | | | | | | | | | | | Another logging passthrough surface that records the style of operations performed trying to categorise what is slow/fast/important. In combination with perf/cairo-analyse-trace it is very useful for understanding what a trace does. The next steps for this tool would be to identify the slow operations that the trace does. Baby steps. This should be generally useful in similar situations outside of perf/ and should be extensible to become an online performance probe. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* boilerplate: improve fidelity of surface extractionChris Wilson2011-08-131-3/+15
| | | | | | Create an image surface of equivalent content to the original. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* XCB: Store the flags per-connection onlyUli Schlachter2011-07-211-29/+16
| | | | | | | | | | | | | | | Every xcb surface had its own copy of the flags from the time that it was created. This means that, if you want to make use of cairo_xcb_device_debug_cap_xrender_version() and cairo_xcb_device_debug_cap_xshm_version(), you first had to create a dummy xcb surface, use that to get access to the cairo_device_t so that you can use these functions and only then create your real surface, because the change only affected new surfaces. This commit changes everything to use the connection's flag and removes the per-surface flags. This avoids the dummy surfaces completely. Signed-off-by: Uli Schlachter <psychon@znc.in>
* xcb: Take advantage of clip-boxesChris Wilson2011-07-201-23/+69
| | | | | | | | | | | | | | | | | A demonstration of step 2, improves performance for selected benchmarks on selected GPUs by up to 30%. firefox-fishbowl on snb {i5-2520m): 42s -> 29s. firefox-talos-gfx on snb: 7.6 -> 5.2s. firefox-fishbowl on pnv (n450): 380 -> 360s. Whist this looks like it is getting close to as good as we can achieve, we are constrained by both our API and Xrender and fishbowl is about 50% slower than peak performance (on snb). And it fixes the older performance regression in firefox-planet-gnome. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Excise xcb-drmChris Wilson2011-07-141-12/+0
| | | | | | | | | | | | | | | | The experiment was at best a pyrrhic victory. Whilst it did show that you could successfully subvert cairo_xcb_surface_t and provide the rendering locally faster (than the xlib driver at that time), any performance benefits were lost in the synchronisation overheads and server-side buffer allocation. Once cairo-gl is mature, we need to look at how we can overcome these to improve client-side rendering In the meantime, cairo-xcb is no longer my playground for experimentation and is shaping up to become a stable backend... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Excise DRM-XrChris Wilson2011-07-141-12/+0
| | | | | | | I've since incorporated (nearly) all the features from cairo-drm into xf86-video-intel, making this experiment defunct. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Xlib: Fix boilerplate to work with xlib-xcbUli Schlachter2011-07-031-0/+6
| | | | | | | | | | | | | | | | | | | Xlib boilerplate includes cairo-xlib-surface-private.h, so that it can cast the xlib cairo_surface_t to cairo_xlib_surface_t and then mess with some internals of that struct. However, xlib-xcb doesn't use that struct and thus this results in random memory corruption. "Luckily", all the fields that this messes with don't corrupt any fields in cairo_xlib_xcb_surface_t, but instead this writes past the end of the buffer that was returned from malloc. This commit just adds an #if to disable this code section since I have no idea what a proper fix would be. This means that the xlib-fallback backend doesn't actually test any fallbacks with xlib-xcb, however it never did so anyway. If you have any idea how to fix xlib-fallback with xlib-xcb, please speak up. Signed-off-by: Uli Schlachter <psychon@znc.in>
* xcb: Use defines instead of magic numbersUli Schlachter2011-06-241-1/+2
| | | | | | render.h gives us nice descriptive names for the precise/imprecise poly modes. Signed-off-by: Uli Schlachter <psychon@znc.in>
* boilerplate: Use correct flag type in DFBWindowDescriptionHaithem Rahmani2011-06-201-1/+1
| | | | | | | | | The window description flag macros are prefixed with DWDESC_. The issue was not noticed because DWDESC_CAPS and DSDESC_CAPS have the same value. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=37049
* build: Clean up environment variables and flags for the win32 buildAndrea Canciani2011-06-201-3/+1
| | | | | Avoid ovverriding LINK, as it has a special meaning for the MSVC build tools.
* boilerplate: Silence MSVC warningsAndrea Canciani2011-06-201-0/+1
| | | | | | | | | | | | On Win32 INT_MIN/MAX macros are defined in stdint.h, which makes MSVC complain about the following redefinitions: ...\stdint.h(73) : warning C4005: 'INT16_MIN' : macro redefinition ...\boilerplate\cairo-boilerplate.h(64) : see previous definition of 'INT16_MIN' ...\stdint.h(77) : warning C4005: 'INT16_MAX' : macro redefinition ...\cairo-boilerplate.h(67) : see previous definition of 'INT16_MAX' ...\stdint.h(80) : warning C4005: 'UINT16_MAX' : macro redefinition ...\boilerplate\cairo-boilerplate.h(70) : see previous definition of 'UINT16_MAX'
* test: Fix compilation on win32Andrea Canciani2011-06-145-9/+34
| | | | | | | The Microsoft C Compiler does not accept empty-initialized arrays: cairo-boilerplate-win32-printing.c(373) : error C2059: syntax error : '}' cairo-boilerplate-win32-printing.c(374) : warning C4034: sizeof returns 0
* boilerplate: Add generation of constructors on win32Andrea Canciani2011-06-141-0/+3
| | | | | | | | cairo-boilerplate-constructors.c is one of the sources required to build the boilerplate. This file is generated by a script, invoked by the appropriate make target during the build.
* boilerplate: Introduce create_similar hookChris Wilson2011-06-0214-0/+37
| | | | | | | | | | | | | | 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>
* perfChris Wilson2011-06-025-6/+206
|
* boilerplate/xcb: Fix silly cut'n'paste errors in previous commitChris Wilson2011-06-011-3/+2
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* xlib,xcb: Force strict adherence to the Render specification when testingChris Wilson2011-06-012-1/+36
| | | | | | | | | | Introduce cairo_xlib_device_debug_set_precision() to override the automatic selection of rendering precision and force the Xorg/DDX to strictly adhere to the precise rendering mode of the Render specification. This allows us to test drivers without worrying, too much, about minor discrepancies in antialiasing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* boilerplate/egl: Add GLES2 supportAlexandros Frantzis2011-05-101-1/+21
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* gl: Add GLESv2 backend to build systemAlexandros Frantzis2011-05-101-0/+12
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* xcb boilerplate: Handle device offsets correctlyUli Schlachter2011-03-041-1/+0
| | | | | | | | | | | | | When running cairo-test-suite with "-a", backends are also tested with a non-zero device offset. However, for "xcb-window&" the boilerplate incorrectly overwrote the device offset with a zero offset again. This caused all test results to be offset by 25 pixels which obviously makes all tests fail. Just removing the call to cairo_surface_set_device_offset solves the problem. Signed-off-by: Uli Schlachter <psychon@znc.in>
* boilerplate/egl: Ensure that we are using an RGBA32 egl configAlexandros Frantzis2011-02-181-5/+12
|
* xcb: Automatically enable the backend if the libs are availableUli Schlachter2011-01-261-1/+1
| | | | | | | | It looks like the cairo-xcb backend is in a good shape and hopefully will be a supported backend for cairo 1.12.0. Let's see if this causes lots of new bugs to be uncovered. :-) Signed-off-by: Uli Schlachter <psychon@znc.in>
* xcb: Fix premature pixmap free in boilerplate cleanupUli Schlachter2011-01-051-0/+1
| | | | | | | A xcb surface has to be finished before the associated drawable can be freed or there will be X11 errors when the surface is later finished or used again. Signed-off-by: Uli Schlachter <psychon@znc.in>
* xcb: Check the check for errors in boilerplateUli Schlachter2011-01-051-0/+13
| | | | | | | | | | | | We have to make sure we received all errors that the X server sent out before we can be sure there are none. To do so, we just have to send some request and wait for its reply, because that guarantees that the replies/errors to all previous requests were received. _cairo_boilerplate_xcb_synchronize doesn't need this, because the GetImage request already makes sure we received everything. Signed-off-by: Uli Schlachter <psychon@znc.in>
* xcb: Check harder for X11 errors in boilerplateUli Schlachter2011-01-051-27/+47
| | | | | | | | This commit makes the boilerplate code check for errors from the X server before disconnecting and during synchronize. This should make sure no errors are ever lost and silently ignored. Signed-off-by: Uli Schlachter <psychon@znc.in>
* xcb: Only print the first error and ignore subsequent onesUli Schlachter2011-01-051-1/+5
| | | | | | | | It is quite likely that following errors are caused by the previous ones. To avoid flooding users we now silently discard all the errors and events after the first one. Signed-off-by: Uli Schlachter <psychon@znc.in>
* xcb: Add a define for some magic numberUli Schlachter2011-01-051-1/+4
| | | | | | | In X11, errors look like events with response_type == 0. Using a define looks better than just a "trust me!". Signed-off-by: Uli Schlachter <psychon@znc.in>
* xcb: Handle events in boilerplateUli Schlachter2011-01-051-7/+6
| | | | | | | Cairo shouldn't cause any events during a test run. Verify this by explicitly handling events, too. Signed-off-by: Uli Schlachter <psychon@znc.in>
* Boilerplate: Set fallback resolution using force_fallbacks functionAdrian Johnson2010-11-284-4/+17
| | | | cairo_set_fallback_resolution() does not work when testing rgb24 surfaces
* XCB: Check screen size in boilerplateUli Schlachter2010-11-071-0/+12
| | | | | | | | | | Trying to create a window for drawing that is larger than the available screen space is a bad idea. When the test finishes and tries to grab the resulting image from the X server, the window's area that is outside of the screen will have undefined content. Signed-off-by: Uli Schlachter <psychon@znc.in> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Add cairo-gobject libraryBenjamin Otte2010-08-071-0/+12
| | | | | This library is supposed to contain GType declarations for Cairo types. It is also meant to support gobject-introspection binding creation.
* configure: Disable xml backend by defaultBenjamin Otte2010-07-301-1/+1
| | | | We don't want to enable it by default when nobody uses it.
* configure: Disable tee backend by defaultBenjamin Otte2010-07-301-1/+3
| | | | We don't want to enable it by default when nobody uses it.
* boilerplate: Offset the xlib windowChris Wilson2010-07-171-2/+2
| | | | | | | An idea courtesy of Benjamin Otte is to stress the drivers a bit more by not rendering to 0,0. Under various circumstances rendering to a Window is mapped onto the Screen root Window with a collection of offsets and clips by X. It is easy for the driver to make a mistake and misrender...
* build: Add explicit dependcy to cxx libBenjamin Otte2010-07-161-0/+3
| | | | | | | Otherwise the build will fail because it doesn't add the dependency manually. https://bugs.freedesktop.org/show_bug.cgi?id=29114
* build: Sync up autogenerated win32 build files.M Joonas Pihlaja2010-07-121-0/+9
|
* build: Split boilerplate lib generation into two so'sBenjamin Otte2010-07-112-12/+26
| | | | | Same thing as what was previously done for libcairo.so: Build an intermediate lib for the (potential) C++ stuff.
* build: Commit new versions of autogenerate Windows build filesBenjamin Otte2010-07-091-10/+82
| | | | | The recent commits to the build system changed a bunch of stuff in there, so update the files.
* boilerplate: Add describe stringBenjamin Otte2010-07-031-3/+18
| | | | Print the pixman version we're using
* gl: Add describe stringBenjamin Otte2010-07-031-4/+25
|
* boilerplate: Add a describe vfuncBenjamin Otte2010-07-0320-34/+71
| | | | | | | | | 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.
* Regenerate default win32 headers.Chris Wilson2010-06-261-8/+0
|
* whitespace: Fixup formal arguments and tabs in boilerplate/ and perf/.M Joonas Pihlaja2010-06-2426-500/+524
| | | | | Ran a script to align the formal parameters of functions and collapse spaces to tabs in code.
* boilerplate: Remove the xlib-window target from Renderless builds.M Joonas Pihlaja2010-06-241-2/+2
| | | | | | | I don't know why _cairo_boilerplate_xlib_window_create_surface() is in the Render-only section of the code, but since it is, this patch makes the boilerplate at least compile if we don't have Render support built in.
* egl: Fail properly if no configs are available instead of crashingBenjamin Otte2010-06-181-0/+4
|
* boilerplate: Reinstate glFinish() for wglBenjamin Otte2010-06-181-1/+1
| | | | It was accidentally disabled.
* gl: Added wgl boilerplate and moved the glx and egl boilerplates into their ↵Zoxc2010-06-175-92/+388
| | | | own files.
* build: Add wgl to Makefile.sources and regenerate features.Chris Wilson2010-06-141-0/+10
|