[cairo-commit] 3 commits - src/cairo-pdf-surface.c src/cairo-ps-surface.c src/cairo-recording-surface.c test/line-width.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Feb 24 08:17:35 PST 2012
src/cairo-pdf-surface.c | 2 --
src/cairo-ps-surface.c | 3 +--
src/cairo-recording-surface.c | 1 -
test/line-width.c | 2 +-
4 files changed, 2 insertions(+), 6 deletions(-)
New commits:
commit 7154f646d30132104f69098b1d0c2f903c32ed53
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Feb 24 16:15:31 2012 +0000
pdf,ps: The device offset only needs to taken into account for raster patterns
Ordinary patterns have their device offsets pre-baked into the pattern
matrix. The difference with raster patterns is that the surface is
generated upon use by the pdf,ps and so its device offset is not known
until then.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index dff5a3a..406ddbc 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -1355,8 +1355,6 @@ _cairo_pdf_surface_add_source_surface (cairo_pdf_surface_t *surface,
cairo_surface_pattern_t *surface_pattern = (cairo_surface_pattern_t *) source_pattern;
source_surface = surface_pattern->surface;
}
- } else {
- cairo_surface_get_device_offset (source_surface, x_offset, y_offset);
}
surface_key.id = source_surface->unique_id;
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 07155e7..043d016 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -1681,6 +1681,7 @@ _cairo_ps_surface_acquire_source_surface_from_pattern (cairo_ps_surface_t
cairo_status_t status;
cairo_image_surface_t *image;
+ *x_offset = *y_offset = 0;
switch (pattern->type) {
case CAIRO_PATTERN_TYPE_SURFACE: {
cairo_surface_t *surf = ((cairo_surface_pattern_t *) pattern)->surface;
@@ -1709,7 +1710,6 @@ _cairo_ps_surface_acquire_source_surface_from_pattern (cairo_ps_surface_t
*width = extents.width;
*height = extents.height;
}
- cairo_surface_get_device_offset (surf, x_offset, y_offset);
*source_surface = surf;
return CAIRO_STATUS_SUCCESS;
@@ -1747,7 +1747,6 @@ _cairo_ps_surface_acquire_source_surface_from_pattern (cairo_ps_surface_t
*width = image->width;
*height = image->height;
- cairo_surface_get_device_offset (&image->base, x_offset, y_offset);
*source_surface = &image->base;
return CAIRO_STATUS_SUCCESS;
}
commit 99ec915b97e36a7576e30c45160cc2b90d0cc92f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Feb 24 14:30:14 2012 +0000
test: a1-line-width is a test of rasterisation, so skip for the vector backends
PDF/PS do not have the concept of aliased rendering, so like many of the
other rasterisation tests, a1-line-width cannot be tested satisfactorily
on those backends.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/test/line-width.c b/test/line-width.c
index 283e41f..315ebc3 100644
--- a/test/line-width.c
+++ b/test/line-width.c
@@ -72,6 +72,6 @@ CAIRO_TEST (line_width,
CAIRO_TEST (a1_line_width,
"Tests cairo_set_line_width",
"stroke", /* keywords */
- NULL, /* requirements */
+ "target=raster", /* requirements */
IMAGE_WIDTH, IMAGE_HEIGHT,
NULL, draw_a1)
commit 513841263e27502646af45fad7f34e96b7f3322e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Feb 24 14:07:10 2012 +0000
recording: Remove superfluous reset
When merging the two-clauses, I forgot to remove the second
_cairo_recording_surface_reset()
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-recording-surface.c b/src/cairo-recording-surface.c
index 601eb0f..3eaf25d 100644
--- a/src/cairo-recording-surface.c
+++ b/src/cairo-recording-surface.c
@@ -720,7 +720,6 @@ _cairo_recording_surface_paint (void *abstract_surface,
_cairo_recording_surface_reset (surface);
if (is_identity_recording_pattern (source)) {
cairo_surface_t *src = ((cairo_surface_pattern_t *)source)->surface;
- _cairo_recording_surface_reset (surface);
return _cairo_recording_surface_replay (src, &surface->base);
}
}
More information about the cairo-commit
mailing list