XCB: Move the assert from 5a0f8f7320

Calling _cairo_xcb_surface_ensure_picture() on a XCB surface whose fallback
member is non-null is always an error. It's possible that the surface first gets
a picture assigned and later it's fallback member is set. In this situation,
it's still wrong to use the surface's picture for any drawing-

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-10-14 18:12:39 +02:00 committed by Chris Wilson
parent c6c3bdba4b
commit 4465ff779a

View file

@ -300,8 +300,8 @@ _cairo_xcb_surface_clear_clip_region (cairo_xcb_surface_t *surface)
static void
_cairo_xcb_surface_ensure_picture (cairo_xcb_surface_t *surface)
{
assert (surface->fallback == NULL);
if (surface->picture == XCB_NONE) {
assert (surface->fallback == NULL);
surface->picture = _cairo_xcb_connection_get_xid (surface->connection);
_cairo_xcb_connection_render_create_picture (surface->connection,
surface->picture,