diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-03-02 14:36:16 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-03-02 14:36:16 +0000 |
commit | 8a59522bbdc61d5c90f1ae55111b5408865755b3 (patch) | |
tree | ecd3e870d0d84d4f08760550f7f84b654e804ef1 | |
parent | f07195860620959c27d43080a7b987e28222735a (diff) |
surface-fallback: Propagate NOTHING_TO_DO
NOTHING_TO_DO is converted to SUCCESS by the surface layer, so clean up
the code slightly by reducing the number of checks and conversions.
-rw-r--r-- | src/cairo-surface-fallback.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c index ae39b2b6..12c606d9 100644 --- a/src/cairo-surface-fallback.c +++ b/src/cairo-surface-fallback.c @@ -1404,11 +1404,8 @@ _cairo_surface_fallback_composite (cairo_operator_t op, cairo_status_t status; status = _fallback_init (&state, dst, dst_x, dst_y, width, height); - if (unlikely (status)) { - if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) - status = CAIRO_STATUS_SUCCESS; + if (unlikely (status)) return status; - } /* We know this will never fail with the image backend; but * instead of calling into it directly, we call @@ -1482,11 +1479,8 @@ _cairo_surface_fallback_fill_rectangles (cairo_surface_t *surface, } status = _fallback_init (&state, surface, x1, y1, x2 - x1, y2 - y1); - if (unlikely (status)) { - if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) - status = CAIRO_STATUS_SUCCESS; + if (unlikely (status)) return status; - } /* If the fetched image isn't at 0,0, we need to offset the rectangles */ @@ -1540,11 +1534,8 @@ _cairo_surface_fallback_composite_trapezoids (cairo_operator_t op, cairo_status_t status; status = _fallback_init (&state, dst, dst_x, dst_y, width, height); - if (unlikely (status)) { - if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) - status = CAIRO_STATUS_SUCCESS; + if (unlikely (status)) return status; - } /* If the destination image isn't at 0,0, we need to offset the trapezoids */ |