Mercurial > sdl-ios-xcode
changeset 4579:d490d63bcc5e
X11_RenderPresent now uses XRender to blit back-buffers to the screen.
author | Sunny Sachanandani <sunnysachanandani@gmail.com> |
---|---|
date | Mon, 31 May 2010 17:04:20 +0530 |
parents | cb338fa6535c |
children | cfea5b007bc7 |
files | src/video/x11/SDL_x11render.c |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 } }