[cairo-commit] src/cairo-xcb-surface-render.c
Uli Schlachter
psychon at kemper.freedesktop.org
Sun Jan 23 13:19:44 PST 2011
src/cairo-xcb-surface-render.c | 1 +
1 file changed, 1 insertion(+)
New commits:
commit c7b16098bd700c6cc82e8fce49eda606ac84ad24
Author: Uli Schlachter <psychon at znc.in>
Date: Sun Jan 23 22:10:20 2011 +0100
xcb: Fix a BadPicture when clearing a surface
This bug was introduced in 6f431886 "xcb: Prefer RenderFillRectangles to perform
the deferred clear". The problem is that we are trying to clear a surface before
we created a Picture for it. This resulted in a FillRectangles call with
dst=XCB_NONE.
I noticed this problem via cairo-perf-micro's dragon-solid-circle-clip.
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index 83e9db8..37921f9 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -2292,6 +2292,7 @@ _cairo_xcb_surface_clear (cairo_xcb_surface_t *dst)
if (dst->flags & CAIRO_XCB_RENDER_HAS_COMPOSITE) {
xcb_render_color_t transparent = { 0 };
+ _cairo_xcb_surface_ensure_picture (dst);
_cairo_xcb_connection_render_fill_rectangles (dst->connection,
XCB_RENDER_PICT_OP_CLEAR,
dst->picture,
More information about the cairo-commit
mailing list