Commit 10e58a4a authored by Uli Schlachter's avatar Uli Schlachter Committed by Chris Wilson
Browse files

Avoid some unneeded 'is_clear = FALSE'



When a drawing operator doesn't actually have any effect, we don't have to set
the surface's is_clear flag to FALSE.
Signed-off-by: Uli Schlachter's avatarUli Schlachter <psychon@znc.in>
parent 2a632b1f
......@@ -2024,7 +2024,8 @@ _cairo_surface_paint (cairo_surface_t *surface,
status = _cairo_surface_fallback_paint (surface, op, source, clip);
FINISH:
surface->is_clear = op == CAIRO_OPERATOR_CLEAR && clip == NULL;
if (status != CAIRO_INT_STATUS_NOTHING_TO_DO)
surface->is_clear = op == CAIRO_OPERATOR_CLEAR && clip == NULL;
return _cairo_surface_set_error (surface, status);
}
......@@ -2079,7 +2080,8 @@ _cairo_surface_mask (cairo_surface_t *surface,
status = _cairo_surface_fallback_mask (surface, op, source, mask, clip);
FINISH:
surface->is_clear = FALSE;
if (status != CAIRO_INT_STATUS_NOTHING_TO_DO)
surface->is_clear = FALSE;
return _cairo_surface_set_error (surface, status);
}
......@@ -2158,7 +2160,8 @@ _cairo_surface_fill_stroke (cairo_surface_t *surface,
goto FINISH;
FINISH:
surface->is_clear = FALSE;
if (status != CAIRO_INT_STATUS_NOTHING_TO_DO)
surface->is_clear = FALSE;
return _cairo_surface_set_error (surface, status);
}
......@@ -2216,7 +2219,8 @@ _cairo_surface_stroke (cairo_surface_t *surface,
clip);
FINISH:
surface->is_clear = FALSE;
if (status != CAIRO_INT_STATUS_NOTHING_TO_DO)
surface->is_clear = FALSE;
return _cairo_surface_set_error (surface, status);
}
......@@ -2270,7 +2274,8 @@ _cairo_surface_fill (cairo_surface_t *surface,
clip);
FINISH:
surface->is_clear = FALSE;
if (status != CAIRO_INT_STATUS_NOTHING_TO_DO)
surface->is_clear = FALSE;
return _cairo_surface_set_error (surface, status);
}
......@@ -2674,7 +2679,8 @@ _cairo_surface_show_text_glyphs (cairo_surface_t *surface,
if (dev_scaled_font != scaled_font)
cairo_scaled_font_destroy (dev_scaled_font);
surface->is_clear = FALSE;
if (status != CAIRO_INT_STATUS_NOTHING_TO_DO)
surface->is_clear = FALSE;
return _cairo_surface_set_error (surface, status);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment