From af9fbd176b145f042408ef5391eef2a51d7531f8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 30 Jul 2011 17:28:21 +0100 Subject: 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 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. :) --- src/cairo-wideint.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/cairo-wideint.c') diff --git a/src/cairo-wideint.c b/src/cairo-wideint.c index b6e22808..59af2c8c 100644 --- a/src/cairo-wideint.c +++ b/src/cairo-wideint.c @@ -99,6 +99,22 @@ _cairo_uint64_to_double (cairo_uint64_t i) return i.hi * 4294967296. + i.lo; } +cairo_int64_t +_cairo_double_to_int64 (double i) +{ + cairo_uint64_t q; + + q.hi = i * (1. / INT32_MAX); + q.lo = i - q.hi * (double)INT32_MAX; + return q; +} + +double +_cairo_int64_to_double (cairo_int64_t i) +{ + return i.hi * INT32_MAX + i.lo; +} + cairo_uint64_t _cairo_uint32_to_uint64 (uint32_t i) { -- cgit v1.2.3