mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 07:58:02 +02:00
xcb: Don't try to fallback more than once
This fixes the following assert for pretty much every single xcb-fallback test: cairo-xcb-surface.c:320: _get_image: Assertion `surface->fallback == ((void *)0)' failed. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
d43f6d7459
commit
87fdc4356f
1 changed files with 8 additions and 4 deletions
|
|
@ -781,6 +781,14 @@ _cairo_xcb_surface_fallback (cairo_xcb_surface_t *surface,
|
|||
cairo_image_surface_t *image;
|
||||
cairo_status_t status;
|
||||
|
||||
status = _cairo_composite_rectangles_add_to_damage (composite,
|
||||
&surface->fallback_damage);
|
||||
if (unlikely (status))
|
||||
return _cairo_surface_create_in_error (status);
|
||||
|
||||
if (surface->fallback)
|
||||
return surface->fallback;
|
||||
|
||||
image = (cairo_image_surface_t *)
|
||||
_get_image (surface, TRUE, 0, 0, surface->width, surface->height);
|
||||
|
||||
|
|
@ -791,10 +799,6 @@ _cairo_xcb_surface_fallback (cairo_xcb_surface_t *surface,
|
|||
surface->fallback = image;
|
||||
}
|
||||
|
||||
status = _cairo_composite_rectangles_add_to_damage (composite,
|
||||
&surface->fallback_damage);
|
||||
if (unlikely (status))
|
||||
return _cairo_surface_create_in_error (status);
|
||||
return &surface->fallback->base;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue