# HG changeset patch # User Sunny Sachanandani # Date 1275230190 -19800 # Node ID 2b98162b536ab8c69a6801f04f042da46a46bfc4 # Parent 037ddbeee6c3e3d535fe164a00e72de73e48a1e1 Add Xrender support to X11_FillRectangles. diff -r 037ddbeee6c3 -r 2b98162b536a src/video/x11/SDL_x11render.c --- a/src/video/x11/SDL_x11render.c Fri May 28 20:48:58 2010 +0530 +++ b/src/video/x11/SDL_x11render.c Sun May 30 20:06:30 2010 +0530 @@ -98,7 +98,7 @@ #ifdef SDL_VIDEO_DRIVER_X11_XRENDER Picture xwindow_pict; Picture pixmap_picts[3]; - Picture * drawable_pict; + Picture drawable_pict; XRenderPictFormat* xwindow_pict_fmt; XRenderPictureAttributes xwindow_pict_attr; unsigned int xwindow_pict_attr_valuemask; @@ -297,14 +297,14 @@ data->drawable = data->pixmaps[0]; #ifdef SDL_VIDEO_DRIVER_X11_XRENDER if(data->xrender_available == SDL_TRUE) - data->drawable_pict = &(data->pixmap_picts[0]); + data->drawable_pict = data->pixmap_picts[0]; #endif data->makedirty = SDL_TRUE; } else { data->drawable = data->xwindow; #ifdef SDL_VIDEO_DRIVER_X11_XRENDER if(data->xrender_available == SDL_TRUE) - data->drawable_pict = &(data->xwindow_pict); + data->drawable_pict = data->xwindow_pict; #endif data->makedirty = SDL_FALSE; } @@ -380,7 +380,7 @@ if (n > 0) { data->drawable = data->pixmaps[0]; #ifdef SDL_VIDEO_DRIVER_X11_XRENDER - data->drawable_pict = &(data->pictures[0]); + data->drawable_pict = data->pictures[0]; #endif } data->current_pixmap = 0; @@ -994,8 +994,18 @@ } } if (xcount > 0) { +#ifdef SDL_VIDEO_DRIVER_X11_XRENDER + if(data->xrender_available == SDL_TRUE) + { + XRenderFillRectangles(data->display, PictOpSrc, data->drawable_pict, + (XRenderColor)foreground, xrects, xcount); + } + else +#endif + { XFillRectangles(data->display, data->drawable, data->gc, xrects, xcount); + } } SDL_stack_free(xpoints);