Skip to content

Commit

Permalink
XCB: Move the assert from 5a0f8f7
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uli Schlachter authored and Chris Wilson committed Oct 21, 2010
1 parent c6c3bdb commit 4465ff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cairo-xcb-surface-render.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4465ff7

Please sign in to comment.