Test lib updates: updated harness to support filtering, added surface comparer, updated interface to test images; added Render test suite from GSOC project

This commit is contained in:
Andreas Schiffler 2012-12-22 16:06:55 -08:00
parent f5af517cd2
commit 81eb615d45
17 changed files with 1739 additions and 184 deletions

View file

@ -667,3 +667,28 @@ const SDLTest_SurfaceImage_t SDLTest_imagePrimitivesBlend = {
"\377\377\377\377\377\377\377\377\324X2\377\377\377\333bB\377\377\377",
};
/**
* \brief Returns the PrimitivesBlend test image as SDL_Surface.
*/
SDL_Surface *SDLTest_ImagePrimitivesBlend()
{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imagePrimitivesBlend.pixel_data,
SDLTest_imagePrimitivesBlend.width,
SDLTest_imagePrimitivesBlend.height,
SDLTest_imagePrimitivesBlend.bytes_per_pixel * 8,
SDLTest_imagePrimitivesBlend.width * SDLTest_imagePrimitivesBlend.bytes_per_pixel,
#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
0xff000000, /* Red bit mask. */
0x00ff0000, /* Green bit mask. */
0x0000ff00, /* Blue bit mask. */
0x000000ff /* Alpha bit mask. */
#else
0x000000ff, /* Red bit mask. */
0x0000ff00, /* Green bit mask. */
0x00ff0000, /* Blue bit mask. */
0xff000000 /* Alpha bit mask. */
#endif
);
return surface;
}