# HG changeset patch # User Sunny Sachanandani # Date 1275305660 -19800 # Node ID d490d63bcc5eeff6d115cc86bc9fa189c74fca40 # Parent cb338fa6535c500cb1d55712c509eada01ffa3f3 X11_RenderPresent now uses XRender to blit back-buffers to the screen. diff -r cb338fa6535c -r d490d63bcc5e src/video/x11/SDL_x11render.c --- a/src/video/x11/SDL_x11render.c Mon May 31 15:09:36 2010 +0530 +++ b/src/video/x11/SDL_x11render.c Mon May 31 17:04:20 2010 +0530 @@ -1205,9 +1205,19 @@ if (!(renderer->info.flags & SDL_RENDERER_SINGLEBUFFER)) { for (dirty = data->dirty.list; dirty; dirty = dirty->next) { const SDL_Rect *rect = &dirty->rect; +#ifdef SDL_VIDEO_DRIVER_X11_XRENDER + if(data->xrender_available == SDL_TRUE) + { + XRenderComposite(data->display, PictOpSrc, data->drawable_pict, None, data->xwindow_pict, + rect->x, rect->y, 0, 0, rect->x, rect->y, rect->w, rect->h); + } + else +#endif + { XCopyArea(data->display, data->drawable, data->xwindow, data->gc, rect->x, rect->y, rect->w, rect->h, rect->x, rect->y); + } } SDL_ClearDirtyRects(&data->dirty); } @@ -1217,9 +1227,15 @@ if (renderer->info.flags & SDL_RENDERER_PRESENTFLIP2) { data->current_pixmap = (data->current_pixmap + 1) % 2; data->drawable = data->pixmaps[data->current_pixmap]; +#ifdef SDL_VIDEO_DRIVER_X11_XRENDER + data->drawable_pict = data->pixmap_picts[data->current_pixmap]; +#endif } else if (renderer->info.flags & SDL_RENDERER_PRESENTFLIP3) { data->current_pixmap = (data->current_pixmap + 1) % 3; data->drawable = data->pixmaps[data->current_pixmap]; +#ifdef SDL_VIDEO_DRIVER_X11_XRENDER + data->drawable_pict = data->pixmap_picts[data->current_pixmap]; +#endif } }