? cairo-no-render-fill-rectangles.diff ? src/.cairo-xlib-surface.c.swp Index: src/cairo-xlib-surface.c =================================================================== RCS file: /cvs/cairo/cairo/src/cairo-xlib-surface.c,v retrieving revision 1.126 diff -p -u -r1.126 cairo-xlib-surface.c --- src/cairo-xlib-surface.c 2 Nov 2005 00:40:37 -0000 1.126 +++ src/cairo-xlib-surface.c 2 Nov 2005 02:51:56 -0000 @@ -1332,8 +1332,32 @@ _cairo_xlib_surface_fill_rectangles (voi cairo_xlib_surface_t *surface = abstract_surface; XRenderColor render_color; - if (!CAIRO_SURFACE_RENDER_HAS_FILL_RECTANGLE (surface)) + if (!CAIRO_SURFACE_RENDER_HAS_FILL_RECTANGLE (surface)) { + if (color->alpha_short == 0xffff /* || operator == CAIRO_SOURCE*/) { + cairo_xlib_surface_t *surface = abstract_surface; + Colormap colormap; + XColor xcolor; + int i; + + _cairo_xlib_surface_ensure_gc (surface); + + memset (&xcolor, 0, sizeof (XColor)); + xcolor.red = color->red_short; + xcolor.green = color->green_short; + xcolor.blue = color->blue_short; + colormap = DefaultColormap (surface->dpy, XScreenNumberOfScreen (surface->screen)); + XAllocColor (surface->dpy, colormap, &xcolor); + XSetForeground (surface->dpy, surface->gc, xcolor.pixel); + + for (i = 0; i < num_rects; i++) + XFillRectangle (surface->dpy, surface->drawable, surface->gc, + rects[i].x, rects[i].y, rects[i].width, rects[i].height); + + XFreeColors (surface->dpy, colormap, &xcolor.pixel, 1, 0); + return CAIRO_STATUS_SUCCESS; + } return CAIRO_INT_STATUS_UNSUPPORTED; + } render_color.red = color->red_short; render_color.green = color->green_short;