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-pattern-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-pattern-private.h')
-rw-r--r-- | src/cairo-pattern-private.h | 58 |
1 files changed, 17 insertions, 41 deletions
diff --git a/src/cairo-pattern-private.h b/src/cairo-pattern-private.h index 46a8ad6e7..8be319e13 100644 --- a/src/cairo-pattern-private.h +++ b/src/cairo-pattern-private.h @@ -40,6 +40,8 @@ #include "cairo-types-private.h" #include "cairo-list-private.h" +#include <stdio.h> /* FILE* */ + CAIRO_BEGIN_DECLS typedef struct _cairo_pattern_observer cairo_pattern_observer_t; @@ -59,19 +61,19 @@ struct _cairo_pattern_observer { }; struct _cairo_pattern { - cairo_pattern_type_t type; cairo_reference_count_t ref_count; cairo_status_t status; cairo_user_data_array_t user_data; + cairo_list_t observers; + + cairo_pattern_type_t type; - cairo_matrix_t matrix; cairo_filter_t filter; cairo_extend_t extend; - double opacity; - cairo_bool_t has_component_alpha; - cairo_list_t observers; + cairo_matrix_t matrix; + double opacity; }; struct _cairo_solid_pattern { @@ -265,46 +267,19 @@ _cairo_mesh_pattern_coord_box (const cairo_mesh_pattern_t *mesh, double *out_xmax, double *out_ymax); -enum { - CAIRO_PATTERN_ACQUIRE_NONE = 0x0, - CAIRO_PATTERN_ACQUIRE_NO_REFLECT = 0x1, -}; -cairo_private cairo_int_status_t -_cairo_pattern_acquire_surface (const cairo_pattern_t *pattern, - cairo_surface_t *dst, - int x, - int y, - unsigned int width, - unsigned int height, - unsigned int flags, - cairo_surface_t **surface_out, - cairo_surface_attributes_t *attributes); - -cairo_private void -_cairo_pattern_release_surface (const cairo_pattern_t *pattern, - cairo_surface_t *surface, - cairo_surface_attributes_t *attributes); - -cairo_private cairo_int_status_t -_cairo_pattern_acquire_surfaces (const cairo_pattern_t *src, - const cairo_pattern_t *mask, - cairo_surface_t *dst, - int src_x, - int src_y, - int mask_x, - int mask_y, - unsigned int width, - unsigned int height, - unsigned int flags, - cairo_surface_t **src_out, - cairo_surface_t **mask_out, - cairo_surface_attributes_t *src_attributes, - cairo_surface_attributes_t *mask_attributes); +cairo_private_no_warn cairo_filter_t +_cairo_pattern_sampled_area (const cairo_pattern_t *pattern, + const cairo_rectangle_int_t *extents, + cairo_rectangle_int_t *sample); cairo_private void _cairo_pattern_get_extents (const cairo_pattern_t *pattern, cairo_rectangle_int_t *extents); +cairo_private cairo_int_status_t +_cairo_pattern_get_ink_extents (const cairo_pattern_t *pattern, + cairo_rectangle_int_t *extents); + cairo_private unsigned long _cairo_pattern_hash (const cairo_pattern_t *pattern); @@ -353,7 +328,8 @@ _cairo_mesh_pattern_rasterize (const cairo_mesh_pattern_t *mesh, double x_offset, double y_offset); - +cairo_private void +_cairo_debug_print_pattern (FILE *file, const cairo_pattern_t *pattern); CAIRO_END_DECLS |