mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-20 17:40:40 +02:00
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.
This commit is contained in:
parent
f071958606
commit
8a59522bbd
1 changed files with 3 additions and 12 deletions
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue