SDL
2.0
|
Go to the source code of this file.
Functions | |
int | SDLTest_CompareSurfaces (SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error) |
Compares a surface and with reference image data for equality. More... | |
Include file for SDL test framework.
This code is a part of the SDL2_test library, not the main SDL library.
Definition in file SDL_test_compare.h.
int SDLTest_CompareSurfaces | ( | SDL_Surface * | surface, |
SDL_Surface * | referenceSurface, | ||
int | allowable_error | ||
) |
Compares a surface and with reference image data for equality.
surface | Surface used in comparison |
referenceSurface | Test Surface used in comparison |
allowable_error | Allowable difference (=sum of squared difference for each RGB component) in blending accuracy. |
Definition at line 39 of file SDL_test_compare.c.
References _CompareSurfaceCount, bpp, SDL_PixelFormat::BytesPerPixel, SDL_Surface::format, G, SDL_Surface::h, i, j, NULL, SDL_Surface::pitch, SDL_Surface::pixels, referenceSurface, SDL_GetRGBA, SDL_LockSurface, SDL_SaveBMP, SDL_snprintf, SDL_UnlockSurface, SDLTest_LogError(), and SDL_Surface::w.
Referenced by _compare(), surface_testBlit(), surface_testBlitAlphaMod(), surface_testBlitBlendAdd(), surface_testBlitBlendBlend(), surface_testBlitBlendLoop(), surface_testBlitBlendMod(), surface_testBlitBlendNone(), surface_testBlitColorMod(), surface_testCompleteSurfaceConversion(), and surface_testSurfaceConversion().