mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-02 09:38:22 +02:00
mark_dirty: Check surface status
This problem was introduced in commit "xlib: Implement SHM fallbacks and fast upload paths". Before, cairo_surface_mark_dirty() directly called cairo_surface_mark_dirty_rectangle() with special "magical arguments" and thus didn't need any checks on the surface status. Fixes: api-special-cases Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
2be125817a
commit
9735d1d716
1 changed files with 7 additions and 0 deletions
|
|
@ -1512,6 +1512,13 @@ cairo_surface_mark_dirty (cairo_surface_t *surface)
|
|||
{
|
||||
cairo_rectangle_int_t extents;
|
||||
|
||||
if (unlikely (surface->status))
|
||||
return;
|
||||
if (unlikely (surface->finished)) {
|
||||
_cairo_surface_set_error (surface, _cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
|
||||
return;
|
||||
}
|
||||
|
||||
_cairo_surface_get_extents (surface, &extents);
|
||||
cairo_surface_mark_dirty_rectangle (surface,
|
||||
extents.x, extents.y,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue