[cairo-commit] src/cairoint.h src/cairo-meta-surface.c src/cairo-pattern.c src/cairo-surface.c
Carl Worth
cworth at kemper.freedesktop.org
Fri May 23 08:14:05 PDT 2008
src/cairo-meta-surface.c | 40 ++++++----------------------------------
src/cairo-pattern.c | 9 +++------
src/cairo-surface.c | 20 --------------------
src/cairoint.h | 12 ------------
4 files changed, 9 insertions(+), 72 deletions(-)
New commits:
commit 1ccfc4afd573e1003319a06624aadff90d351e83
Author: Carl Worth <cworth at cworth.org>
Date: Fri May 23 08:14:00 2008 -0700
Revert "BUGGY: Add surface_backend->acquire_source_image_transformed"
This reverts commit ddcd6781a24463df5a1f25cd5ffdbce47f35cf2f.
This was an experimental commit that was intended to be on a side
branch but accidentally got committed and pushed to master. Sorry
for the noise.
diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c
index f652de7..6abb29a 100644
--- a/src/cairo-meta-surface.c
+++ b/src/cairo-meta-surface.c
@@ -182,26 +182,17 @@ _cairo_meta_surface_finish (void *abstract_surface)
}
static cairo_status_t
-_cairo_meta_surface_acquire_source_image_transformed (
- void *abstract_surface,
- cairo_matrix_t *device_transform,
- cairo_image_surface_t **image_out,
- void **image_extra)
+_cairo_meta_surface_acquire_source_image (void *abstract_surface,
+ cairo_image_surface_t **image_out,
+ void **image_extra)
{
cairo_status_t status;
cairo_meta_surface_t *surface = abstract_surface;
cairo_surface_t *image;
- double width = surface->width_pixels;
- double height = surface->height_pixels;
-
- cairo_matrix_transform_distance (device_transform, &width, &height);
image = _cairo_image_surface_create_with_content (surface->content,
- ceil (width),
- ceil (height));
-
- _cairo_surface_set_device_scale (image,
- device_transform->xx, device_transform->yy);
+ surface->width_pixels,
+ surface->height_pixels);
status = _cairo_meta_surface_replay (&surface->base, image);
if (status) {
@@ -215,19 +206,6 @@ _cairo_meta_surface_acquire_source_image_transformed (
return status;
}
-static cairo_status_t
-_cairo_meta_surface_acquire_source_image (void *abstract_surface,
- cairo_image_surface_t **image_out,
- void **image_extra)
-{
- cairo_matrix_t identity;
-
- cairo_matrix_init_identity (&identity);
-
- return _cairo_meta_surface_acquire_source_image_transformed (
- abstract_surface, &identity, image_out, image_extra);
-}
-
static void
_cairo_meta_surface_release_source_image (void *abstract_surface,
cairo_image_surface_t *image,
@@ -651,13 +629,7 @@ static const cairo_surface_backend_t cairo_meta_surface_backend = {
_cairo_meta_surface_fill,
_cairo_meta_surface_show_glyphs,
- _cairo_meta_surface_snapshot,
-
- NULL, /* is_similar */
- NULL, /* reset */
- NULL, /* fill_stroke */
-
- _cairo_meta_surface_acquire_source_image_transformed
+ _cairo_meta_surface_snapshot
};
static cairo_path_fixed_t *
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index 1975daf..c0bfbaf 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -1702,12 +1702,9 @@ _cairo_pattern_acquire_surface_for_surface (cairo_surface_pattern_t *pattern,
{
cairo_image_surface_t *image;
- status = _cairo_surface_acquire_source_image_transformed (
- pattern->surface,
- &dst->device_transform,
- &image,
- &attr->extra);
-
+ status = _cairo_surface_acquire_source_image (pattern->surface,
+ &image,
+ &attr->extra);
if (status)
return status;
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 833737c..ba39b9b 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -968,26 +968,6 @@ _cairo_surface_acquire_source_image (cairo_surface_t *surface,
image_out, image_extra));
}
-cairo_status_t
-_cairo_surface_acquire_source_image_transformed (cairo_surface_t *surface,
- cairo_matrix_t *device_transform,
- cairo_image_surface_t **image_out,
- void **image_extra)
-{
- assert (!surface->finished);
-
- if (surface->status)
- return surface->status;
-
- if (surface->backend->acquire_source_image_transformed == NULL)
- return _cairo_surface_acquire_source_image (surface,
- image_out, image_extra);
-
- return _cairo_surface_set_error (surface,
- surface->backend->acquire_source_image_transformed (
- surface, device_transform, image_out, image_extra));
-}
-
/**
* _cairo_surface_release_source_image:
* @surface: a #cairo_surface_t
diff --git a/src/cairoint.h b/src/cairoint.h
index f930b51..8716bd4 100755
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -738,12 +738,6 @@ struct _cairo_surface_backend {
cairo_matrix_t *stroke_ctm_inverse,
double stroke_tolerance,
cairo_antialias_t stroke_antialias);
-
- cairo_warn cairo_status_t
- (*acquire_source_image_transformed) (void *abstract_surface,
- cairo_matrix_t *device_trasnform,
- cairo_image_surface_t **image_out,
- void **image_extra);
};
#include "cairo-surface-private.h"
@@ -1727,12 +1721,6 @@ _cairo_surface_acquire_source_image (cairo_surface_t *surface,
cairo_image_surface_t **image_out,
void **image_extra);
-cairo_private cairo_status_t
-_cairo_surface_acquire_source_image_transformed (cairo_surface_t *surface,
- cairo_matrix_t *device_trasnform,
- cairo_image_surface_t **image_out,
- void **image_extra);
-
cairo_private void
_cairo_surface_release_source_image (cairo_surface_t *surface,
cairo_image_surface_t *image,
More information about the cairo-commit
mailing list