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-composite-rectangles-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-composite-rectangles-private.h')
-rw-r--r-- | src/cairo-composite-rectangles-private.h | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/src/cairo-composite-rectangles-private.h b/src/cairo-composite-rectangles-private.h index f0553ab0b..8a06bf9f7 100644 --- a/src/cairo-composite-rectangles-private.h +++ b/src/cairo-composite-rectangles-private.h @@ -39,6 +39,7 @@ #include "cairo-types-private.h" #include "cairo-error-private.h" +#include "cairo-pattern-private.h" CAIRO_BEGIN_DECLS @@ -52,6 +53,9 @@ CAIRO_BEGIN_DECLS * */ struct _cairo_composite_rectangles { + cairo_surface_t *surface; + cairo_operator_t op; + cairo_rectangle_int_t source; cairo_rectangle_int_t mask; cairo_rectangle_int_t destination; @@ -60,19 +64,27 @@ struct _cairo_composite_rectangles { cairo_rectangle_int_t unbounded; /* destination IN clip */ uint32_t is_bounded; + cairo_rectangle_int_t source_sample_area; + cairo_rectangle_int_t mask_sample_area; + + cairo_pattern_union_t source_pattern; + cairo_pattern_union_t mask_pattern; + const cairo_pattern_t *original_source_pattern; + const cairo_pattern_t *original_mask_pattern; + cairo_clip_t *clip; /* clip will be reduced to the minimal container */ }; cairo_private cairo_int_status_t _cairo_composite_rectangles_init_for_paint (cairo_composite_rectangles_t *extents, - const cairo_rectangle_int_t *unbounded, + cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, const cairo_clip_t *clip); cairo_private cairo_int_status_t _cairo_composite_rectangles_init_for_mask (cairo_composite_rectangles_t *extents, - const cairo_rectangle_int_t *unbounded, + cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, const cairo_pattern_t *mask, @@ -80,7 +92,7 @@ _cairo_composite_rectangles_init_for_mask (cairo_composite_rectangles_t *extents cairo_private cairo_int_status_t _cairo_composite_rectangles_init_for_stroke (cairo_composite_rectangles_t *extents, - const cairo_rectangle_int_t *unbounded, + cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, const cairo_path_fixed_t *path, @@ -90,15 +102,31 @@ _cairo_composite_rectangles_init_for_stroke (cairo_composite_rectangles_t *exten cairo_private cairo_int_status_t _cairo_composite_rectangles_init_for_fill (cairo_composite_rectangles_t *extents, - const cairo_rectangle_int_t *unbounded, + cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, const cairo_path_fixed_t *path, const cairo_clip_t *clip); cairo_private cairo_int_status_t +_cairo_composite_rectangles_init_for_boxes (cairo_composite_rectangles_t *extents, + cairo_surface_t *surface, + cairo_operator_t op, + const cairo_pattern_t *source, + const cairo_boxes_t *boxes, + const cairo_clip_t *clip); + +cairo_private cairo_int_status_t +_cairo_composite_rectangles_init_for_polygon (cairo_composite_rectangles_t *extents, + cairo_surface_t *surface, + cairo_operator_t op, + const cairo_pattern_t *source, + const cairo_polygon_t *polygon, + const cairo_clip_t *clip); + +cairo_private cairo_int_status_t _cairo_composite_rectangles_init_for_glyphs (cairo_composite_rectangles_t *extents, - const cairo_rectangle_int_t *unbounded, + cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, cairo_scaled_font_t *scaled_font, |