[cairo-commit] src/cairo-surface-fallback.c
Benjamin Otte
company at kemper.freedesktop.org
Thu Apr 29 07:56:10 PDT 2010
src/cairo-surface-fallback.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
New commits:
commit 758ffadcb1d0a0478d43ca40775687a37e5920a4
Author: Benjamin Otte <otte at redhat.com>
Date: Thu Apr 29 16:54:09 2010 +0200
fallback: Only do _fill/compsoite_rectangles on bounded source
For unbounded sources, these optimizations fail to take into account the
regions outside the source.
diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c
index f3016a1..5c01c4e 100644
--- a/src/cairo-surface-fallback.c
+++ b/src/cairo-surface-fallback.c
@@ -799,13 +799,15 @@ _clip_and_composite_trapezoids (const cairo_pattern_t *src,
{
cairo_region_t *trap_region = NULL;
- status = _fill_rectangles (dst, op, src, traps, clip);
- if (status != CAIRO_INT_STATUS_UNSUPPORTED)
- return status;
-
- status = _composite_rectangle (dst, op, src, traps, clip);
- if (status != CAIRO_INT_STATUS_UNSUPPORTED)
- return status;
+ if (_cairo_operator_bounded_by_source (op)) {
+ status = _fill_rectangles (dst, op, src, traps, clip);
+ if (status != CAIRO_INT_STATUS_UNSUPPORTED)
+ return status;
+
+ status = _composite_rectangle (dst, op, src, traps, clip);
+ if (status != CAIRO_INT_STATUS_UNSUPPORTED)
+ return status;
+ }
status = _cairo_traps_extract_region (traps, &trap_region);
if (unlikely (_cairo_status_is_error (status)))
More information about the cairo-commit
mailing list