summaryrefslogtreecommitdiff
path: root/src/cairo-meta-surface.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2008-08-27 15:54:15 -0700
committerCarl Worth <cworth@cworth.org>2008-09-10 14:54:18 -0700
commitbdcdc8400ef8c199eb7dea961ea13b75ae93176d (patch)
tree1ad19eef085689a497c7df8fb98b9b05d863d31b /src/cairo-meta-surface.c
parent9016504e2ab2718603838aa2504513fa5aeefd7e (diff)
downloadcairo-bdcdc8400ef8c199eb7dea961ea13b75ae93176d.tar.gz
Rename _init_pattern_with_snapshot to _cairo_pattern_init_snapshot
Diffstat (limited to 'src/cairo-meta-surface.c')
-rw-r--r--src/cairo-meta-surface.c38
1 files changed, 6 insertions, 32 deletions
diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c
index ee52b4919..d939efea5 100644
--- a/src/cairo-meta-surface.c
+++ b/src/cairo-meta-surface.c
@@ -216,32 +216,6 @@ _cairo_meta_surface_release_source_image (void *abstract_surface,
cairo_surface_destroy (&image->base);
}
-static cairo_status_t
-_init_pattern_with_snapshot (cairo_pattern_t *pattern,
- const cairo_pattern_t *other)
-{
- cairo_status_t status;
-
- status = _cairo_pattern_init_copy (pattern, other);
- if (status)
- return status;
-
- if (pattern->type == CAIRO_PATTERN_TYPE_SURFACE) {
- cairo_surface_pattern_t *surface_pattern =
- (cairo_surface_pattern_t *) pattern;
- cairo_surface_t *surface = surface_pattern->surface;
-
- surface_pattern->surface = _cairo_surface_snapshot (surface);
-
- cairo_surface_destroy (surface);
-
- if (surface_pattern->surface->status)
- return surface_pattern->surface->status;
- }
-
- return CAIRO_STATUS_SUCCESS;
-}
-
static cairo_int_status_t
_cairo_meta_surface_paint (void *abstract_surface,
cairo_operator_t op,
@@ -259,7 +233,7 @@ _cairo_meta_surface_paint (void *abstract_surface,
command->header.region = CAIRO_META_REGION_ALL;
command->op = op;
- status = _init_pattern_with_snapshot (&command->source.base, source);
+ status = _cairo_pattern_init_snapshot (&command->source.base, source);
if (status)
goto CLEANUP_COMMAND;
@@ -300,11 +274,11 @@ _cairo_meta_surface_mask (void *abstract_surface,
command->header.region = CAIRO_META_REGION_ALL;
command->op = op;
- status = _init_pattern_with_snapshot (&command->source.base, source);
+ status = _cairo_pattern_init_snapshot (&command->source.base, source);
if (status)
goto CLEANUP_COMMAND;
- status = _init_pattern_with_snapshot (&command->mask.base, mask);
+ status = _cairo_pattern_init_snapshot (&command->mask.base, mask);
if (status)
goto CLEANUP_SOURCE;
@@ -346,7 +320,7 @@ _cairo_meta_surface_stroke (void *abstract_surface,
command->header.region = CAIRO_META_REGION_ALL;
command->op = op;
- status = _init_pattern_with_snapshot (&command->source.base, source);
+ status = _cairo_pattern_init_snapshot (&command->source.base, source);
if (status)
goto CLEANUP_COMMAND;
@@ -401,7 +375,7 @@ _cairo_meta_surface_fill (void *abstract_surface,
command->header.region = CAIRO_META_REGION_ALL;
command->op = op;
- status = _init_pattern_with_snapshot (&command->source.base, source);
+ status = _cairo_pattern_init_snapshot (&command->source.base, source);
if (status)
goto CLEANUP_COMMAND;
@@ -459,7 +433,7 @@ _cairo_meta_surface_show_text_glyphs (void *abstract_surface,
command->header.region = CAIRO_META_REGION_ALL;
command->op = op;
- status = _init_pattern_with_snapshot (&command->source.base, source);
+ status = _cairo_pattern_init_snapshot (&command->source.base, source);
if (status)
goto CLEANUP_COMMAND;