diff options
author | Benjamin Otte <otte@redhat.com> | 2010-04-29 16:54:09 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-04-29 16:54:09 +0200 |
commit | 758ffadcb1d0a0478d43ca40775687a37e5920a4 (patch) | |
tree | 3412759daf0fc921c542201411a01ce3a346e16e /src/cairo-surface-fallback.c | |
parent | 6288ad719da898c4a75cdc6527f5a41d4c900e57 (diff) | |
download | cairo-758ffadcb1d0a0478d43ca40775687a37e5920a4.tar.gz |
fallback: Only do _fill/compsoite_rectangles on bounded source
For unbounded sources, these optimizations fail to take into account the
regions outside the source.
Diffstat (limited to 'src/cairo-surface-fallback.c')
-rw-r--r-- | src/cairo-surface-fallback.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c index f3016a1b7..5c01c4e76 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))) |