summaryrefslogtreecommitdiff
path: root/test/get-clip.c
AgeCommit message (Collapse)AuthorFilesLines
2010-07-17clip: consider gstate target extents in _cairo_gstate_copy_clip_rectangle_listKarl Tomlinson1-0/+16
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29125 To be consistent with _cairo_gstate_clip_extents, the context's clip should be intersected with the target surface extents (instead of only using them when there is no clip). Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-17clip: consider all_clipped in _cairo_clip_get_extentsKarl Tomlinson1-1/+4
If the gstate clip in _cairo_gstate_int_clip_extents() has all_clipped set (and path NULL), then it returns the gstate target extents instead of an empty rectangle. If the target is infinite, then it says the clip is unbounded. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29124 Tested-by test/get-clip Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-17test: return CAIRO_TEST_FAILURE from get-clip preamble on failureKarl Tomlinson1-0/+5
https://bugs.freedesktop.org/show_bug.cgi?id=29120
2010-07-17test: use the surface size expected in get-clip phase "No clip set"Karl Tomlinson1-3/+5
https://bugs.freedesktop.org/show_bug.cgi?id=29121
2009-07-23[test] clip representation is no longer surface dependentChris Wilson1-126/+74
So we can test the api just once in the preamble and not per-target.
2009-07-23[drm] Add an accelerated image surface.Chris Wilson1-0/+1
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.
2009-07-21Merge commit 'anholt/gl'Chris Wilson1-0/+1
Conflicts: boilerplate/Makefile.sources boilerplate/cairo-boilerplate.c build/configure.ac.features src/cairo.h util/cairo-script/Makefile.am
2009-07-17Add OpenVG backend.Chris Wilson1-0/+1
Based on the work by Øyvind Kolås and Pierre Tardy -- many thanks to Pierre for pushing this backend for inclusion as well as testing and reviewing my initial patch. And many more thanks to pippin for writing the backend in the first place! Hacked and chopped by myself into a suitable basis for a backend. Quite a few issues remain open, but would seem to be ready for testing on suitable hardware.
2009-07-03Export meta-surfaceChris Wilson1-0/+5
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.
2009-02-16[sdl] Remove new backend.M Joonas Pihlaja1-1/+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
2008-10-31[test] Build test suite into single binary.Chris Wilson1-14/+7
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.
2008-10-18[test/get-clip] Check the status on the secondary context.Chris Wilson1-48/+50
As we solely use a secondary context, we must manually report NO_MEMORY errors whilst running under memfault.
2008-08-13[test] Preparatory work for running under memfault.Chris Wilson1-31/+35
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/.
2007-12-20[test/*] Create new surfaces using the group target.Chris Wilson1-1/+1
cairo_get_target() returns the original surface passed to cairo_create(), and not the current destination as required when testing drawing to the same surface using multiple contexts. For completeness we also use the group target when creating similar surfaces within the tests (to check that similar surfaces of similar surfaces also work).
2007-02-20[quartz] Rename nquartz to quartzVladimir Vukicevic1-2/+1
2007-01-17Rename cairo_copy_clip_rectangles to cairo_copy_clip_rectangle_listRobert O'Callahan1-13/+13
2006-11-14Fix get-clip test for surfaces not implementing set_clip_regionCarl Worth1-8/+16
2006-09-25Add clip getters API + testsRobert O'Callahan1-0/+277
Add new public API methods: void cairo_clip_extents (cairo_t *cr, double *x1, double *y1, double *x2, double *y2); cairo_rectangle_list_t *cairo_copy_clip_rectangles (cairo_t *); void cairo_rectangle_list_destroy (cairo_rectangle_list_t *); Also add 'get-clip' and 'get-path-extents' tests.