summaryrefslogtreecommitdiff
path: root/src/cairo-surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cairo-surface.c')
-rw-r--r--src/cairo-surface.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 51eb6f0a..e080c31e 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -91,11 +91,6 @@ static DEFINE_NIL_SURFACE(CAIRO_STATUS_WRITE_ERROR, _cairo_surface_nil_write_err
static DEFINE_NIL_SURFACE(CAIRO_STATUS_INVALID_STRIDE, _cairo_surface_nil_invalid_stride);
static DEFINE_NIL_SURFACE(CAIRO_STATUS_INVALID_SIZE, _cairo_surface_nil_invalid_size);
-static void
-_cairo_surface_copy_pattern_for_destination (const cairo_pattern_t **pattern,
- cairo_surface_t *destination,
- cairo_pattern_t *pattern_copy);
-
/**
* _cairo_surface_set_error:
* @surface: a surface
@@ -1922,7 +1917,6 @@ _cairo_surface_paint (cairo_surface_t *surface,
cairo_clip_t *clip)
{
cairo_status_t status;
- cairo_pattern_union_t dev_source;
if (unlikely (surface->status))
return surface->status;
@@ -1932,10 +1926,6 @@ _cairo_surface_paint (cairo_surface_t *surface,
_cairo_surface_begin_modification (surface);
- _cairo_surface_copy_pattern_for_destination (&source,
- surface,
- &dev_source.base);
-
if (surface->backend->paint != NULL) {
status = surface->backend->paint (surface, op, source, clip);
if (status != CAIRO_INT_STATUS_UNSUPPORTED)
@@ -1956,8 +1946,6 @@ _cairo_surface_mask (cairo_surface_t *surface,
cairo_clip_t *clip)
{
cairo_status_t status;
- cairo_pattern_union_t dev_source;
- cairo_pattern_union_t dev_mask;
if (unlikely (surface->status))
return surface->status;
@@ -1967,11 +1955,6 @@ _cairo_surface_mask (cairo_surface_t *surface,
_cairo_surface_begin_modification (surface);
- _cairo_surface_copy_pattern_for_destination (&source, surface,
- &dev_source.base);
- _cairo_surface_copy_pattern_for_destination (&mask, surface,
- &dev_mask.base);
-
if (surface->backend->mask != NULL) {
status = surface->backend->mask (surface, op, source, mask, clip);
if (status != CAIRO_INT_STATUS_UNSUPPORTED)
@@ -2012,16 +1995,9 @@ _cairo_surface_fill_stroke (cairo_surface_t *surface,
_cairo_surface_begin_modification (surface);
if (surface->backend->fill_stroke) {
- cairo_pattern_union_t dev_stroke_source;
- cairo_pattern_union_t dev_fill_source;
cairo_matrix_t dev_ctm = *stroke_ctm;
cairo_matrix_t dev_ctm_inverse = *stroke_ctm_inverse;
- _cairo_surface_copy_pattern_for_destination (&stroke_source, surface,
- &dev_stroke_source.base);
- _cairo_surface_copy_pattern_for_destination (&fill_source, surface,
- &dev_fill_source.base);
-
status = surface->backend->fill_stroke (surface,
fill_op, fill_source, fill_rule,
fill_tolerance, fill_antialias,
@@ -2065,7 +2041,6 @@ _cairo_surface_stroke (cairo_surface_t *surface,
cairo_clip_t *clip)
{
cairo_status_t status;
- cairo_pattern_union_t dev_source;
if (unlikely (surface->status))
return surface->status;
@@ -2075,9 +2050,6 @@ _cairo_surface_stroke (cairo_surface_t *surface,
_cairo_surface_begin_modification (surface);
- _cairo_surface_copy_pattern_for_destination (&source, surface,
- &dev_source.base);
-
if (surface->backend->stroke != NULL) {
status = surface->backend->stroke (surface, op, source,
path, stroke_style,
@@ -2110,7 +2082,6 @@ _cairo_surface_fill (cairo_surface_t *surface,
cairo_clip_t *clip)
{
cairo_status_t status;
- cairo_pattern_union_t dev_source;
if (unlikely (surface->status))
return surface->status;
@@ -2120,8 +2091,6 @@ _cairo_surface_fill (cairo_surface_t *surface,
_cairo_surface_begin_modification (surface);
- _cairo_surface_copy_pattern_for_destination (&source, surface,
- &dev_source.base);
if (surface->backend->fill != NULL) {
status = surface->backend->fill (surface, op, source,
path, fill_rule,
@@ -2429,7 +2398,6 @@ _cairo_surface_show_text_glyphs (cairo_surface_t *surface,
{
cairo_status_t status;
cairo_scaled_font_t *dev_scaled_font = scaled_font;
- cairo_pattern_union_t dev_source;
if (unlikely (surface->status))
return surface->status;
@@ -2442,9 +2410,6 @@ _cairo_surface_show_text_glyphs (cairo_surface_t *surface,
_cairo_surface_begin_modification (surface);
- _cairo_surface_copy_pattern_for_destination (&source, surface,
- &dev_source.base);
-
if (_cairo_surface_has_device_transform (surface) &&
! _cairo_matrix_is_integer_translation (&surface->device_transform, NULL, NULL))
{
@@ -2794,30 +2759,6 @@ _cairo_surface_composite_shape_fixup_unbounded (cairo_surface_t *dst,
}
/**
- * _cairo_surface_copy_pattern_for_destination
- * @pattern: the pattern to copy
- * @destination: the destination surface for which the pattern is being copied
- * @pattern_copy: the location to hold the copy
- *
- * Copies the given pattern, taking into account device scale and offsets
- * of the destination surface.
- */
-static void
-_cairo_surface_copy_pattern_for_destination (const cairo_pattern_t **pattern,
- cairo_surface_t *destination,
- cairo_pattern_t *pattern_copy)
-{
- if (! _cairo_surface_has_device_transform (destination))
- return;
-
- _cairo_pattern_init_static_copy (pattern_copy, *pattern);
- _cairo_pattern_transform (pattern_copy,
- &destination->device_transform_inverse);
-
- *pattern = pattern_copy;
-}
-
-/**
* _cairo_surface_set_resolution
* @surface: the surface
* @x_res: x resolution, in dpi