From cb70cb42eb54f2d62555140e4b12bf838bc4164f Mon Sep 17 00:00:00 2001 From: Mike Gorchak Date: Fri, 20 Nov 2009 07:11:29 +0000 Subject: [PATCH] 1. SDL_RenderPresent() call has been added after each test to be sure, that all graphics output is flushed in case if it was asynchronous. 2. After each renderer test window recreation has been added. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404205 --- test/automated/render/render.c | 38 ++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/test/automated/render/render.c b/test/automated/render/render.c index 6e92885cf..e14ac2da2 100644 --- a/test/automated/render/render.c +++ b/test/automated/render/render.c @@ -329,6 +329,9 @@ static int render_clearScreen (void) return -1; */ + /* Flush all asynchronous operations */ + SDL_RenderPresent(); + return 0; } @@ -410,6 +413,9 @@ static int render_testPrimitives (void) 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; @@ -527,6 +533,9 @@ static int render_testPrimitivesBlend (void) } } + /* 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; @@ -579,6 +588,9 @@ static int render_testBlit (void) /* 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; @@ -636,6 +648,9 @@ static int render_testBlitColour (void) /* 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 )) @@ -698,6 +713,9 @@ static int render_testBlitAlpha (void) /* 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 )) @@ -745,6 +763,9 @@ static int render_testBlitBlendMode( SDL_TextureID tface, int mode ) } } + /* Flush all asynchronous operations */ + SDL_RenderPresent(); + return 0; } @@ -862,6 +883,9 @@ static int render_testBlitBlend (void) /* 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 )) @@ -879,7 +903,7 @@ static int render_testBlitBlend (void) int render_runTests (void) { int ret; - + /* No error. */ ret = 0; @@ -911,7 +935,6 @@ int render_runTests (void) return -1; ret = render_testBlitBlend(); - return ret; } @@ -1004,6 +1027,14 @@ int test_render (void) SDL_ATend(); for (j=0; j