summaryrefslogtreecommitdiff
path: root/src/cairo-surface-observer-private.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-07-30 17:28:21 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-09-12 08:29:48 +0100
commitaf9fbd176b145f042408ef5391eef2a51d7531f8 (patch)
tree5f75d1087d4325a013af6f0a4204a666fb4ca4f0 /src/cairo-surface-observer-private.h
parent0540bf384aed344899417d3b0313bd6704679c1c (diff)
downloadcairo-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-surface-observer-private.h')
-rw-r--r--src/cairo-surface-observer-private.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/cairo-surface-observer-private.h b/src/cairo-surface-observer-private.h
index 61507b21d..1b5d6d949 100644
--- a/src/cairo-surface-observer-private.h
+++ b/src/cairo-surface-observer-private.h
@@ -33,14 +33,16 @@
* Chris Wilson <chris@chris-wilson.co.uk>
*/
-#ifndef CAIRO_SURFACE_SNAPSHOT_PRIVATE_H
-#define CAIRO_SURFACE_SNAPSHOT_PRIVATE_H
+#ifndef CAIRO_SURFACE_OBSERVER_PRIVATE_H
+#define CAIRO_SURFACE_OBSERVER_PRIVATE_H
-#include "cairoint.h" /* cairo_surface_backend_t */
+#include "cairoint.h"
#include "cairo-device-private.h"
+#include "cairo-list-private.h"
#include "cairo-recording-surface-private.h"
#include "cairo-surface-private.h"
+#include "cairo-surface-backend-private.h"
#include "cairo-time-private.h"
struct stat {
@@ -180,11 +182,27 @@ struct _cairo_device_observer {
cairo_observation_t log;
};
+struct callback_list {
+ cairo_list_t link;
+
+ cairo_surface_observer_callback_t func;
+ void *data;
+};
+
struct _cairo_surface_observer {
cairo_surface_t base;
cairo_surface_t *target;
cairo_observation_t log;
+
+ cairo_list_t paint_callbacks;
+ cairo_list_t mask_callbacks;
+ cairo_list_t fill_callbacks;
+ cairo_list_t stroke_callbacks;
+ cairo_list_t glyphs_callbacks;
+
+ cairo_list_t flush_callbacks;
+ cairo_list_t finish_callbacks;
};
static inline cairo_surface_t *