Fixed swizzle of SDL_FillRect() on 24-bit surface (thanks, "nagydavid91"!).
Fixes Bugzilla #2986.
1 /* See COPYING.txt for the full license governing this code. */
5 * Source file for the operations that act on variators.
9 #include "SDL_visualtest_variators.h"
12 SDLVisualTest_InitVariator(SDLVisualTest_Variator* variator,
13 SDLVisualTest_SUTConfig* config,
14 SDLVisualTest_VariatorType type,
19 SDLTest_LogError("variator argument cannot be NULL");
24 SDLTest_LogError("config argument cannot be NULL");
28 variator->type = type;
31 case SDL_VARIATOR_EXHAUSTIVE:
32 return SDLVisualTest_InitExhaustiveVariator(&variator->data.exhaustive,
36 case SDL_VARIATOR_RANDOM:
37 return SDLVisualTest_InitRandomVariator(&variator->data.random,
42 SDLTest_LogError("Invalid value for variator type");
49 SDLVisualTest_GetNextVariation(SDLVisualTest_Variator* variator)
53 SDLTest_LogError("variator argument cannot be NULL");
56 switch(variator->type)
58 case SDL_VARIATOR_EXHAUSTIVE:
59 return SDLVisualTest_GetNextExhaustiveVariation(&variator->data.exhaustive);
62 case SDL_VARIATOR_RANDOM:
63 return SDLVisualTest_GetNextRandomVariation(&variator->data.random);
67 SDLTest_LogError("Invalid value for variator type");
73 void SDLVisualTest_FreeVariator(SDLVisualTest_Variator* variator)
77 SDLTest_LogError("variator argument cannot be NULL");
80 switch(variator->type)
82 case SDL_VARIATOR_EXHAUSTIVE:
83 SDLVisualTest_FreeExhaustiveVariator(&variator->data.exhaustive);
86 case SDL_VARIATOR_RANDOM:
87 SDLVisualTest_FreeRandomVariator(&variator->data.random);
91 SDLTest_LogError("Invalid value for variator type");