[cairo-commit] 2 commits - src/cairo-meta-surface.c
Chris Wilson
ickle at kemper.freedesktop.org
Thu Aug 7 16:07:51 PDT 2008
src/cairo-meta-surface.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
New commits:
commit f916e2178b6f52e3b3600d100dfe75bfa4bf12cb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Aug 7 23:54:25 2008 +0100
[meta] Use the pre-computed device_transform_inverse.
Avoid repeatedly inverting the same matrix by using the pre-computed
inverse.
diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c
index 2b61825..ee52b49 100644
--- a/src/cairo-meta-surface.c
+++ b/src/cairo-meta-surface.c
@@ -844,14 +844,12 @@ _cairo_meta_surface_replay_internal (cairo_surface_t *surface,
{
cairo_matrix_t dev_ctm = command->stroke.ctm;
cairo_matrix_t dev_ctm_inverse = command->stroke.ctm_inverse;
- cairo_matrix_t tmp;
if (has_device_transform) {
cairo_matrix_multiply (&dev_ctm, &dev_ctm, device_transform);
- tmp = surface->device_transform;
- status = cairo_matrix_invert (&tmp);
- assert (status == CAIRO_STATUS_SUCCESS);
- cairo_matrix_multiply (&dev_ctm_inverse, &tmp, &dev_ctm_inverse);
+ cairo_matrix_multiply (&dev_ctm_inverse,
+ &surface->device_transform_inverse,
+ &dev_ctm_inverse);
}
status = _cairo_surface_stroke (target,
@@ -885,17 +883,15 @@ _cairo_meta_surface_replay_internal (cairo_surface_t *surface,
_cairo_path_fixed_is_equal (dev_path, _cairo_command_get_path (stroke_command))) {
cairo_matrix_t dev_ctm;
cairo_matrix_t dev_ctm_inverse;
- cairo_matrix_t tmp;
dev_ctm = stroke_command->stroke.ctm;
dev_ctm_inverse = stroke_command->stroke.ctm_inverse;
if (has_device_transform) {
cairo_matrix_multiply (&dev_ctm, &dev_ctm, device_transform);
- tmp = surface->device_transform;
- status = cairo_matrix_invert (&tmp);
- assert (status == CAIRO_STATUS_SUCCESS);
- cairo_matrix_multiply (&dev_ctm_inverse, &tmp, &dev_ctm_inverse);
+ cairo_matrix_multiply (&dev_ctm_inverse,
+ &surface->device_transform_inverse,
+ &dev_ctm_inverse);
}
status = _cairo_surface_fill_stroke (target,
commit 523f7258014f9db421297d14804e71e1da9f9761
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Aug 7 22:00:30 2008 +0100
[meta] Remove debugging assert.
Remove an old assertion that no error occurred.
diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c
index 427266b..2b61825 100644
--- a/src/cairo-meta-surface.c
+++ b/src/cairo-meta-surface.c
@@ -973,7 +973,6 @@ _cairo_meta_surface_replay_internal (cairo_surface_t *surface,
command->intersect_clip_path.tolerance,
command->intersect_clip_path.antialias,
target);
- assert (status == 0);
break;
default:
ASSERT_NOT_REACHED;
More information about the cairo-commit
mailing list