diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-16 18:04:54 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-29 08:08:39 +0100 |
commit | 658cdc7c9aac23f82f3ea5db8df10844aeb3ac75 (patch) | |
tree | d713b560009c59e252f105b1f5ca86ca221209b9 /src/cairo-surface.c | |
parent | 4ae7186719b25f052b875549cc5377e16a557512 (diff) |
Introduce cairo_tee_surface_t
Add a new surface type that multiplies it input onto several output
surfaces. The only limitation is that it requires a master surface that is
used whenever we need to query surface options, such as font options and
extents.
Diffstat (limited to 'src/cairo-surface.c')
-rw-r--r-- | src/cairo-surface.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cairo-surface.c b/src/cairo-surface.c index 84a30121..624f71ff 100644 --- a/src/cairo-surface.c +++ b/src/cairo-surface.c @@ -42,6 +42,7 @@ #include "cairo-clip-private.h" #include "cairo-meta-surface-private.h" #include "cairo-region-private.h" +#include "cairo-tee-surface-private.h" #define DEFINE_NIL_SURFACE(status, name) \ const cairo_surface_t name = { \ @@ -1528,6 +1529,16 @@ _cairo_surface_clone_similar (cairo_surface_t *surface, if (unlikely (surface->finished)) return _cairo_error (CAIRO_STATUS_SURFACE_FINISHED); + if (src->type == CAIRO_SURFACE_TYPE_TEE) { + cairo_surface_t *match; + + match = _cairo_tee_surface_find_match (src, + surface->backend, + content); + if (match != NULL) + src = match; + } + if (surface->backend->clone_similar != NULL) { status = surface->backend->clone_similar (surface, src, content, |