Mercurial > sdl-ios-xcode
changeset 3466:a288892cd24c
SDL_RenderReadPixels() needs to flush asynchronous operations before it reads.
The semantics are that it reads the back buffer, and those pixels may not be available once SDL_RenderPresent() has happened.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 21 Nov 2009 05:05:19 +0000 |
parents | 0cbfec87e4f1 |
children | 383c2058d973 |
files | test/automated/render/render.c |
diffstat | 1 files changed, 0 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/test/automated/render/render.c Fri Nov 20 14:42:40 2009 +0000 +++ b/test/automated/render/render.c Sat Nov 21 05:05:19 2009 +0000 @@ -329,9 +329,6 @@ return -1; */ - /* Flush all asynchronous operations */ - SDL_RenderPresent(); - return 0; } @@ -413,9 +410,6 @@ if (SDL_ATassert( "SDL_RenderLine", ret == 0)) return -1; - /* Flush all asynchronous operations */ - SDL_RenderPresent(); - /* See if it's the same. */ if (render_compare( "Primitives output not the same.", &img_primitives )) return -1; @@ -533,9 +527,6 @@ } } - /* Flush all asynchronous operations */ - SDL_RenderPresent(); - /* See if it's the same. */ if (render_compare( "Blended primitives output not the same.", &img_blend )) return -1; @@ -588,9 +579,6 @@ /* Clean up. */ SDL_DestroyTexture( tface ); - /* Flush all asynchronous operations */ - SDL_RenderPresent(); - /* See if it's the same. */ if (render_compare( "Blit output not the same.", &img_blit )) return -1; @@ -648,9 +636,6 @@ /* Clean up. */ SDL_DestroyTexture( tface ); - /* Flush all asynchronous operations */ - SDL_RenderPresent(); - /* See if it's the same. */ if (render_compare( "Blit output not the same (using SDL_SetTextureColorMod).", &img_blitColour )) @@ -713,9 +698,6 @@ /* Clean up. */ SDL_DestroyTexture( tface ); - /* Flush all asynchronous operations */ - SDL_RenderPresent(); - /* See if it's the same. */ if (render_compare( "Blit output not the same (using SDL_SetSurfaceAlphaMod).", &img_blitAlpha )) @@ -763,9 +745,6 @@ } } - /* Flush all asynchronous operations */ - SDL_RenderPresent(); - return 0; } @@ -883,9 +862,6 @@ /* Clean up. */ SDL_DestroyTexture( tface ); - /* Flush all asynchronous operations */ - SDL_RenderPresent(); - /* Check to see if matches. */ if (render_compare( "Blit blending output not the same (using SDL_BLENDMODE_*).", &img_blendAll ))