[cairo-commit] 3 commits - src/cairo-image-source.c src/cairo-script-surface.c src/cairo-surface-wrapper.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Feb 22 11:56:49 PST 2012
src/cairo-image-source.c | 13 +------------
src/cairo-script-surface.c | 14 +++++++-------
src/cairo-surface-wrapper.c | 8 ++------
3 files changed, 10 insertions(+), 25 deletions(-)
New commits:
commit 7e3c9631915b85acd915161cb2ba00cb24033e58
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Feb 22 19:55:22 2012 +0000
surface-wrapper: Transform the clip by the device-transform correctly
Fixes paginated fallbacks.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-surface-wrapper.c b/src/cairo-surface-wrapper.c
index 931d11d..a1940a5 100644
--- a/src/cairo-surface-wrapper.c
+++ b/src/cairo-surface-wrapper.c
@@ -124,12 +124,8 @@ _cairo_surface_wrapper_get_clip (cairo_surface_wrapper_t *wrapper,
copy = _cairo_clip_intersect_rectangle (copy, &wrapper->extents);
}
copy = _cairo_clip_transform (copy, &wrapper->transform);
- if (! _cairo_matrix_is_identity (&wrapper->target->device_transform)) {
- /* XXX */
- copy = _cairo_clip_translate (copy,
- wrapper->target->device_transform.x0,
- wrapper->target->device_transform.y0);
- }
+ if (! _cairo_matrix_is_identity (&wrapper->target->device_transform))
+ copy = _cairo_clip_transform (copy, &wrapper->target->device_transform);
if (wrapper->clip)
copy = _cairo_clip_intersect_clip (copy, wrapper->clip);
commit d6908135f4fc98496bc1e9a1d48a3ae95cc30594
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Feb 22 19:54:12 2012 +0000
image: Tidy reduction to EXTEND_NONE for replay surfaces
As _cairo_surface_get_source() returns the limits of the source, a chunk
of code to query the source extents became redundant.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-image-source.c b/src/cairo-image-source.c
index 58a18e3..3fa75e5 100644
--- a/src/cairo-image-source.c
+++ b/src/cairo-image-source.c
@@ -631,19 +631,8 @@ _pixman_image_for_recording (cairo_image_surface_t *dst,
ty = limit.y;
extend = pattern->base.extend;
- if (_cairo_surface_get_extents (source, &limit)) {
- if (_cairo_rectangle_contains_rectangle (&limit, sample))
- {
- extend = CAIRO_EXTEND_NONE;
- }
- else if (extend == CAIRO_EXTEND_NONE &&
- ! _cairo_rectangle_intersects (&limit, sample))
- {
- return _pixman_transparent_image ();
- }
- } else
+ if (_cairo_rectangle_contains_rectangle (&limit, sample))
extend = CAIRO_EXTEND_NONE;
-
if (extend == CAIRO_EXTEND_NONE) {
if (! _cairo_rectangle_intersect (&limit, sample))
return _pixman_transparent_image ();
commit 58639857f9fbe99f4fca6ab2b1d13306ffbfe8d8
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Feb 22 17:42:16 2012 +0000
script: Update mesh pattern for earlier change of csi operators
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c
index a779780..f235be9 100644
--- a/src/cairo-script-surface.c
+++ b/src/cairo-script-surface.c
@@ -1008,7 +1008,7 @@ _emit_mesh_pattern (cairo_script_surface_t *surface,
cairo_path_data_t *data;
int j;
- _cairo_output_stream_printf (ctx->stream, "\n mesh-begin-patch");
+ _cairo_output_stream_printf (ctx->stream, "\n begin-patch");
path = cairo_mesh_pattern_get_path (mesh, i);
if (unlikely (path->status))
@@ -1019,17 +1019,17 @@ _emit_mesh_pattern (cairo_script_surface_t *surface,
switch (data->header.type) {
case CAIRO_PATH_MOVE_TO:
_cairo_output_stream_printf (ctx->stream,
- "\n %f %f mesh-move-to",
+ "\n %f %f m",
data[1].point.x, data[1].point.y);
break;
case CAIRO_PATH_LINE_TO:
_cairo_output_stream_printf (ctx->stream,
- "\n %f %f mesh-line-to",
+ "\n %f %f l",
data[1].point.x, data[1].point.y);
break;
case CAIRO_PATH_CURVE_TO:
_cairo_output_stream_printf (ctx->stream,
- "\n %f %f %f %f %f %f mesh-curve-to",
+ "\n %f %f %f %f %f %f c",
data[1].point.x, data[1].point.y,
data[2].point.x, data[2].point.y,
data[3].point.x, data[3].point.y);
@@ -1047,7 +1047,7 @@ _emit_mesh_pattern (cairo_script_surface_t *surface,
if (unlikely (status))
return status;
_cairo_output_stream_printf (ctx->stream,
- "\n %d %f %f mesh-set-control-point",
+ "\n %d %f %f set-control-point",
j, x, y);
}
@@ -1059,11 +1059,11 @@ _emit_mesh_pattern (cairo_script_surface_t *surface,
return status;
_cairo_output_stream_printf (ctx->stream,
- "\n %d %f %f %f %f mesh-set-corner-color",
+ "\n %d %f %f %f %f set-corner-color",
j, r, g, b, a);
}
- _cairo_output_stream_printf (ctx->stream, "\n mesh-end-patch");
+ _cairo_output_stream_printf (ctx->stream, "\n end-patch");
}
return CAIRO_STATUS_SUCCESS;
More information about the cairo-commit
mailing list