summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-09-03 23:25:53 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-09-03 23:25:53 +0100
commit00ca0780b8f06ec160d8f969e316c21fbbde04bc (patch)
tree7915c5fc05b3e4b7b99651f210d0055ca621e33d /src
parent535bcaa1a1dac28fbe3106c6605949171bc36cb2 (diff)
[win32] Remove unused clone_similar()
The win32 backend handles surface sources directly and never calls _cairo_pattern_acquire_surface() which is the only other possible user of clone_similar().
Diffstat (limited to 'src')
-rw-r--r--src/cairo-win32-printing-surface.c2
-rw-r--r--src/cairo-win32-surface.c57
2 files changed, 2 insertions, 57 deletions
diff --git a/src/cairo-win32-printing-surface.c b/src/cairo-win32-printing-surface.c
index f4c384df..f20b5f93 100644
--- a/src/cairo-win32-printing-surface.c
+++ b/src/cairo-win32-printing-surface.c
@@ -1741,7 +1741,7 @@ static const cairo_surface_backend_t cairo_win32_printing_surface_backend = {
NULL, /* release_source_image */
NULL, /* acquire_dest_image */
NULL, /* release_dest_image */
- _cairo_win32_surface_clone_similar,
+ NULL, /* clone_similar */
NULL, /* composite */
NULL, /* fill_rectangles */
NULL, /* composite_trapezoids */
diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index d946dfee..69afa175 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -432,61 +432,6 @@ _cairo_win32_surface_create_similar (void *abstract_src,
}
cairo_status_t
-_cairo_win32_surface_clone_similar (void *abstract_surface,
- cairo_surface_t *src,
- cairo_content_t content,
- int src_x,
- int src_y,
- int width,
- int height,
- int *clone_offset_x,
- int *clone_offset_y,
- cairo_surface_t **clone_out)
-{
- cairo_content_t src_content;
- cairo_surface_t *new_surface;
- cairo_status_t status;
- cairo_surface_pattern_t pattern;
-
- src_content = src->content & content;
- new_surface =
- _cairo_win32_surface_create_similar_internal (abstract_surface,
- src_content,
- width, height,
- FALSE);
- if (new_surface == NULL)
- return CAIRO_INT_STATUS_UNSUPPORTED;
-
- status = new_surface->status;
- if (status)
- return status;
-
- _cairo_pattern_init_for_surface (&pattern, src);
-
- status = _cairo_surface_composite (CAIRO_OPERATOR_SOURCE,
- &pattern.base,
- NULL,
- new_surface,
- src_x, src_y,
- 0, 0,
- 0, 0,
- width, height,
- NULL);
-
- _cairo_pattern_fini (&pattern.base);
-
- if (status == CAIRO_STATUS_SUCCESS) {
- *clone_offset_x = src_x;
- *clone_offset_y = src_y;
- *clone_out = new_surface;
- } else
- cairo_surface_destroy (new_surface);
-
- return status;
-}
-
-
-cairo_status_t
_cairo_win32_surface_finish (void *abstract_surface)
{
cairo_win32_surface_t *surface = abstract_surface;
@@ -2069,7 +2014,7 @@ static const cairo_surface_backend_t cairo_win32_surface_backend = {
_cairo_win32_surface_release_source_image,
_cairo_win32_surface_acquire_dest_image,
_cairo_win32_surface_release_dest_image,
- _cairo_win32_surface_clone_similar,
+ NULL, /* clone similar */
_cairo_win32_surface_composite,
_cairo_win32_surface_fill_rectangles,
NULL, /* composite_trapezoids */