-
Uli Schlachter authored
In commit 10e58a4a I changed the code in cairo-surface.c to avoid setting surface->is_clear = FALSE; in some situations where it was not necessary, because the operation did not actually modify anything (it returned CAIRO_INT_STATUS_NOTHING_TO_DO). However, that change accidentally also caused _cairo_surface_paint() not to set surface->is_clear = TRUE; in similar cases. That was unintended. This commit fixes that by always setting is_clear = TRUE when necessary, but keeps the optimisation of not setting is_clear = FALSE when not necessary. The connection to the below issue is that the issue happened with surfaces with width=0. Clearing such a surface with CAIRO_OPERATOR_CLEAR causes CAIRO_INT_STATUS_NOTHING_TO_DO and thus is_clear = TRUE was not set. This error was later caught by a failed assertion. Fixes: cairo/cairo#283 Signed-off-by: Uli Schlachter <psychon@znc.in>
a7c49ec8