xcb: Add an assert for the tighten-bounds test

This code casts the result of _cairo_xcb_surface_create_similar() to
cairo_xcb_surface_t*. However, the tighten-bounds test makes this run with
bounded extents of size 0x0 and thus _cairo_xcb_surface_create_similar() falls
back to an image surface. Ugly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2011-08-30 22:10:34 +02:00
parent 70118ee119
commit 5f45f696d0

View file

@ -1841,6 +1841,9 @@ _clip_and_composite_combine (cairo_clip_t *clip,
if (unlikely (tmp->base.status))
return tmp->base.status;
/* create_similar() could have done a fallback to an image surface */
assert (tmp->base.backend == &_cairo_xcb_surface_backend);
_cairo_xcb_surface_ensure_picture (tmp);
if (pattern == NULL) {