diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-07-30 17:28:21 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-12 08:29:48 +0100 |
commit | af9fbd176b145f042408ef5391eef2a51d7531f8 (patch) | |
tree | 5f75d1087d4325a013af6f0a4204a666fb4ca4f0 /src/cairo-time-private.h | |
parent | 0540bf384aed344899417d3b0313bd6704679c1c (diff) | |
download | cairo-af9fbd176b145f042408ef5391eef2a51d7531f8.tar.gz |
Introduce a new compositor architecture
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. :)
Diffstat (limited to 'src/cairo-time-private.h')
-rw-r--r-- | src/cairo-time-private.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/cairo-time-private.h b/src/cairo-time-private.h index f7c48f389..06dc912b4 100644 --- a/src/cairo-time-private.h +++ b/src/cairo-time-private.h @@ -33,15 +33,16 @@ #include "cairo-compiler-private.h" #include "cairo-wideint-private.h" -typedef cairo_uint64_t cairo_time_t; +/* Make the base type signed for easier arithmetic */ +typedef cairo_int64_t cairo_time_t; -#define _cairo_time_add _cairo_uint64_add -#define _cairo_time_sub _cairo_uint64_sub -#define _cairo_time_gt _cairo_uint64_gt -#define _cairo_time_lt _cairo_uint64_lt +#define _cairo_time_add _cairo_int64_add +#define _cairo_time_sub _cairo_int64_sub +#define _cairo_time_gt _cairo_int64_gt +#define _cairo_time_lt _cairo_int64_lt -#define _cairo_time_to_double _cairo_uint64_to_double -#define _cairo_time_from_double _cairo_double_to_uint64 +#define _cairo_time_to_double _cairo_int64_to_double +#define _cairo_time_from_double _cairo_double_to_int64 cairo_private int _cairo_time_cmp (const void *a, @@ -75,7 +76,7 @@ _cairo_time_to_ns (cairo_time_t t) static cairo_always_inline cairo_time_t _cairo_time_max (cairo_time_t a, cairo_time_t b) { - if (_cairo_uint64_gt (a, b)) + if (_cairo_int64_gt (a, b)) return a; else return b; @@ -84,7 +85,7 @@ _cairo_time_max (cairo_time_t a, cairo_time_t b) static cairo_always_inline cairo_time_t _cairo_time_min (cairo_time_t a, cairo_time_t b) { - if (_cairo_uint64_lt (a, b)) + if (_cairo_int64_lt (a, b)) return a; else return b; |