summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2011-08-30 22:10:34 +0200
committerUli Schlachter <psychon@znc.in>2011-08-30 22:10:34 +0200
commit5f45f696d0a82dd9f9d4534d135fe75ce11b5223 (patch)
tree130467e9dde9e204085a2b75b3bfa02ecb5de884
parent70118ee119c352322860926bd7ce3d0af7c1a3a4 (diff)
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>
-rw-r--r--src/cairo-xcb-surface-render.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index 2627837b..82319629 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -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) {