소스 검색

Add testautomation suite for alpha blending

Isaac Aronson 1 년 전
부모
커밋
594ca1a897
4개의 변경된 파일557개의 추가작업 그리고 0개의 파일을 삭제
  1. 206 0
      test/testautomation_blit.c
  2. 348 0
      test/testautomation_images.c
  3. 2 0
      test/testautomation_images.h
  4. 1 0
      test/testautomation_suites.h

+ 206 - 0
test/testautomation_blit.c

@@ -0,0 +1,206 @@
+/**
+ * SDL_BlitSurface bit-perfect rendering test suite written by Isaac Aronson
+ */
+
+/* Suppress C4996 VS compiler warnings for unlink() */
+#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+#define _CRT_SECURE_NO_DEPRECATE
+#endif
+#if defined(_MSC_VER) && !defined(_CRT_NONSTDC_NO_DEPRECATE)
+#define _CRT_NONSTDC_NO_DEPRECATE
+#endif
+
+#include <stdio.h>
+#ifndef _MSC_VER
+#include <unistd.h>
+#endif
+#include <sys/stat.h>
+
+#include <SDL3/SDL.h>
+#include <SDL3/SDL_test.h>
+#include "testautomation_images.h"
+
+/* ====== xoroshiro128+ PRNG engine for deterministic blit input ===== */
+Uint64 rotl(uint64_t x, int k) { return (x << k) | (x >> (-k & 63)); }
+Uint64 next(uint64_t state[2]) {
+    Uint64 s0 = state[0], s1 = state[1];
+    Uint64 result = rotl((s0 + s1) * 9, 29) + s0;
+    state[0] = s0 ^ rotl(s1, 29);
+    state[1] = s0 ^ s1 << 9;
+    return result;
+}
+static Uint64 rngState[2] = {1, 2};
+Uint32 getRandomUint32() {
+    return (Uint32)next(rngState);
+}
+/* ================= Test Case Helper Functions ================== */
+/*
+ * Resets PRNG state to initialize tests using PRNG
+ */
+void blitSetUp(void *arg) {
+    rngState[0] = 1;
+    rngState[1] = 2;
+}
+/*
+ * Generates a stream of PRNG pixel data given length
+ */
+Uint32 *getNextRandomBuffer(const int width, const int height) {
+    Uint32* buf = SDL_malloc(sizeof(Uint32) * width * height);
+    for (int i = 0; i < width * height; i++) {
+        buf[i] = getRandomUint32();
+    }
+    return buf;
+}
+/*
+ * Generates a small 15 x 15px surface of PRNG pixel data
+ */
+SDL_Surface* getRandomBlitChunk(Uint32 *pixels, SDL_PixelFormatEnum format) {
+    return SDL_CreateSurfaceFrom(pixels, 15, 15, 15 * 4, format);
+}
+/*
+ * Generates a 800 x 600 surface of PRNG pixel data
+ */
+SDL_Surface* getRandomSVGASurface(Uint32 *pixels, SDL_PixelFormatEnum format) {
+    return SDL_CreateSurfaceFrom(pixels, 800, 600, 800 * 4, format);
+}
+/*
+ * Calculates the FNV-1a hash of input pixel data
+ */
+Uint32 FNVHash(Uint32* buf, unsigned int length) {
+    const Uint32 fnv_prime = 0x811C9DC5;
+    Uint32 hash = 0;
+
+    for (int i = 0; i < length; buf++, i++)
+    {
+        hash *= fnv_prime;
+        hash ^= (*buf);
+    }
+
+    return hash;
+}
+/*
+ * Wraps the FNV-1a hash for an input surface's pixels
+ */
+Uint32 hashSurfacePixels(SDL_Surface * surface) {
+    Uint64 buffer_size = surface->w * surface->h;
+    return FNVHash(surface->pixels, buffer_size);
+}
+/* ================= Test Case Implementation ================== */
+/**
+ * Tests rendering a rainbow gradient background onto a blank surface, then rendering a sprite with complex geometry and
+ * transparency on top of said surface, and comparing the result to known accurate renders with a hash.
+ */
+int blit_testExampleApplicationRender(void *arg) {
+    const int width = 32;
+    const int height = 32;
+    const Uint32 scalar_hash = 0xf47a3f55;
+    const Uint32 x86_simd_hash = 0xe345d7a7;
+    SDL_Surface* dest_surface = SDL_CreateSurface(width, height, SDL_PIXELFORMAT_ARGB8888);
+    SDL_Surface* rainbow_background = SDLTest_ImageBlendingBackground();
+    SDL_Surface* gearbrain_sprite = SDLTest_ImageBlendingSprite();
+    // Blit background into "screen"
+    SDL_BlitSurface(rainbow_background, NULL, dest_surface, NULL);
+    // Blit example game sprite onto "screen"
+    SDL_BlitSurface(gearbrain_sprite, NULL, dest_surface, NULL);
+    // Check result
+    Uint32 hash = hashSurfacePixels(dest_surface);
+    SDLTest_AssertCheck(hash == scalar_hash || hash == x86_simd_hash,
+                        "Should render identically, expected 0x%x (scalar) or 0x%x (x86_simd), got 0x%x",
+                        scalar_hash, x86_simd_hash, hash);
+    // Clean up
+    SDL_DestroySurface(rainbow_background);
+    SDL_DestroySurface(gearbrain_sprite);
+    SDL_DestroySurface(dest_surface);
+    return TEST_COMPLETED;
+}
+/**
+ * Tests rendering PRNG noise onto a surface of PRNG noise, while also testing color shift operations between the
+ * different source and destination pixel formats, without an alpha shuffle, at SVGA resolution. Compares to known
+ * accurate renders with a hash.
+ */
+int blit_testRandomToRandomSVGA(void *arg) {
+    const int width = 800;
+    const int height = 600;
+    const Uint32 scalar_hash = 0x1f56efad;
+    const Uint32 x86_simd_hash = 0x42140c5f;
+    // Allocate random buffers
+    Uint32 *dest_pixels = getNextRandomBuffer(width, height);
+    Uint32 *src_pixels = getNextRandomBuffer(width, height);
+    // Create surfaces of different pixel formats
+    SDL_Surface* dest_surface = getRandomSVGASurface(dest_pixels, SDL_PIXELFORMAT_BGRA8888);
+    SDL_Surface* src_surface = getRandomSVGASurface(src_pixels, SDL_PIXELFORMAT_RGBA8888);
+    // Blit surfaces
+    SDL_BlitSurface(src_surface, NULL, dest_surface, NULL);
+    // Check result
+    Uint32 hash = hashSurfacePixels(dest_surface);
+    SDLTest_AssertCheck(hash == scalar_hash || hash == x86_simd_hash,
+                        "Should render identically, expected 0x%x (scalar) or 0x%x (x86_simd), got 0x%x",
+                        scalar_hash, x86_simd_hash, hash);
+    // Clean up
+    SDL_DestroySurface(dest_surface);
+    SDL_DestroySurface(src_surface);
+    SDL_free(dest_pixels);
+    SDL_free(src_pixels);
+    return TEST_COMPLETED;
+}
+/**
+ * Tests rendering small chunks of 15 by 15px PRNG noise onto an initially blank SVGA surface, while also testing color
+ * shift operations between the different source and destination pixel formats, including an alpha shuffle. Compares to
+ * known accurate renders with a hash.
+ */
+int blit_testRandomToRandomSVGAMultipleIterations(void *arg) {
+    const int width = 800;
+    const int height = 600;
+    const Uint32 x86_simd_hash = 0x2626be78;
+    const Uint32 scalar_hash = 0xfb2a8ee8;
+    // Create blank source surface
+    SDL_Surface* dest_surface = SDL_CreateSurface(width, height, SDL_PIXELFORMAT_ABGR8888);
+
+    // Perform 250k random blits into random areas of the blank surface
+    for (int i = 0; i < 250000; i++) {
+        Uint32 *buf = getNextRandomBuffer(15, 15);
+        SDL_Surface *sourceSurface = getRandomBlitChunk(buf, SDL_PIXELFORMAT_RGBA8888);
+
+        SDL_Rect dest_rect;
+        int location = (int)getRandomUint32();
+        dest_rect.x = location % (width - 15 - 1);
+        dest_rect.y = location % (height - 15 - 1);
+
+        SDL_BlitSurface(sourceSurface, NULL, dest_surface, &dest_rect);
+
+        SDL_DestroySurface(sourceSurface);
+        SDL_free(buf);
+    }
+    // Check result
+    Uint32 hash = hashSurfacePixels(dest_surface);
+    // Clean up
+    SDL_SaveBMP(dest_surface, "250k_scalar.bmp");
+    SDL_DestroySurface(dest_surface);
+    SDLTest_AssertCheck(hash == scalar_hash || hash == x86_simd_hash,
+                        "Should render identically, expected 0x%x (scalar) or 0x%x (x86_simd), got 0x%x",
+                        scalar_hash, x86_simd_hash, hash);
+    return TEST_COMPLETED;
+}
+
+static const SDLTest_TestCaseReference blitTest1 = {
+        (SDLTest_TestCaseFp)blit_testExampleApplicationRender, "blit_testExampleApplicationRender",
+        "Test example application render.", TEST_ENABLED
+};
+static const SDLTest_TestCaseReference blitTest2 = {
+        (SDLTest_TestCaseFp)blit_testRandomToRandomSVGA, "blit_testRandomToRandomSVGA",
+        "Test SVGA noise render.", TEST_ENABLED
+};
+static const SDLTest_TestCaseReference blitTest3 = {
+        (SDLTest_TestCaseFp)blit_testRandomToRandomSVGAMultipleIterations, "blit_testRandomToRandomSVGAMultipleIterations",
+        "Test SVGA noise render (250k iterations).", TEST_ENABLED
+};
+static const SDLTest_TestCaseReference *blitTests[] = {
+        &blitTest1, &blitTest2, &blitTest3, NULL
+};
+
+SDLTest_TestSuiteReference blitTestSuite = {
+        "Blending",
+        blitSetUp,
+        blitTests,
+        NULL
+};

+ 348 - 0
test/testautomation_images.c

@@ -5927,3 +5927,351 @@ SDL_Surface *SDLTest_ImagePrimitivesBlend(void)
         SDLTest_imagePrimitivesBlend.width * SDLTest_imagePrimitivesBlend.bytes_per_pixel, SDL_PIXELFORMAT_RGB24);
     return surface;
 }
+
+/* Rainbow gradient background */
+
+static const SDLTest_SurfaceImage_t SDLTest_imageRainbowBackground = {
+        32,
+        32,
+        4,
+        "\000\016\377\377\000\031\377\377\000\045\377\377\000\061\377\377\000\075\377\377\000\111\377\377\000\125\377"
+        "\377\000\141\377\377\000\155\377\377\000\171\377\377\000\205\377\377\000\221\377\377\000\234\377\377\000\250"
+        "\377\377\000\264\377\377\000\300\377\377\000\314\377\377\000\330\377\377\000\344\377\377\000\360\377\377\000"
+        "\374\377\377\000\377\356\377\000\377\326\377\000\377\276\377\000\377\246\377\000\377\216\377\000\377\167\377"
+        "\000\377\137\377\000\377\107\377\000\377\060\377\000\377\027\377\003\377\003\377\000\031\377\377\000\045\377"
+        "\377\000\061\377\377\000\075\377\377\000\111\377\377\000\125\377\377\000\141\377\377\000\155\377\377\000\170"
+        "\377\377\000\204\377\377\000\220\377\377\000\234\377\377\000\250\377\377\000\264\377\377\000\300\377\377\000"
+        "\314\377\377\000\330\377\377\000\344\377\377\000\360\377\377\000\373\377\377\000\377\357\377\000\377\326\377"
+        "\000\377\276\377\000\377\247\377\000\377\217\377\000\377\167\377\000\377\137\377\000\377\110\377\000\377\060"
+        "\377\000\377\030\377\003\377\003\377\027\377\000\377\000\045\377\377\000\061\377\377\000\075\377\377\000\111"
+        "\377\377\000\125\377\377\000\141\377\377\000\155\377\377\000\171\377\377\000\205\377\377\000\221\377\377\000"
+        "\235\377\377\000\251\377\377\000\264\377\377\000\300\377\377\000\314\377\377\000\330\377\377\000\344\377\377"
+        "\000\360\377\377\000\374\377\377\000\377\357\377\000\377\325\377\000\377\276\377\000\377\246\377\000\377\216"
+        "\377\000\377\167\377\000\377\137\377\000\377\107\377\000\377\060\377\000\377\027\377\002\377\002\377\030\377"
+        "\000\377\060\377\000\377\000\061\377\377\000\075\377\377\000\111\377\377\000\125\377\377\000\141\377\377\000"
+        "\155\377\377\000\171\377\377\000\205\377\377\000\221\377\377\000\234\377\377\000\250\377\377\000\264\377\377"
+        "\000\300\377\377\000\314\377\377\000\330\377\377\000\344\377\377\000\360\377\377\000\374\377\377\000\377\357"
+        "\377\000\377\326\377\000\377\276\377\000\377\246\377\000\377\217\377\000\377\167\377\000\377\137\377\000\377"
+        "\107\377\000\377\060\377\000\377\027\377\003\377\003\377\027\377\000\377\061\377\000\377\110\377\000\377\000"
+        "\075\377\377\000\111\377\377\000\125\377\377\000\141\377\377\000\155\377\377\000\171\377\377\000\205\377\377"
+        "\000\221\377\377\000\234\377\377\000\250\377\377\000\264\377\377\000\300\377\377\000\314\377\377\000\330\377"
+        "\377\000\344\377\377\000\360\377\377\000\374\377\377\000\377\357\377\000\377\326\377\000\377\276\377\000\377"
+        "\246\377\000\377\217\377\000\377\167\377\000\377\137\377\000\377\107\377\000\377\060\377\000\377\027\377\003"
+        "\377\003\377\027\377\000\377\060\377\000\377\110\377\000\377\140\377\000\377\000\111\377\377\000\125\377\377"
+        "\000\141\377\377\000\155\377\377\000\171\377\377\000\205\377\377\000\221\377\377\000\234\377\377\000\250\377"
+        "\377\000\264\377\377\000\300\377\377\000\314\377\377\000\330\377\377\000\344\377\377\000\360\377\377\000\374"
+        "\377\377\000\377\357\377\000\377\326\377\000\377\276\377\000\377\246\377\000\377\217\377\000\377\167\377\000"
+        "\377\137\377\000\377\107\377\000\377\060\377\000\377\027\377\003\377\003\377\027\377\000\377\060\377\000\377"
+        "\107\377\000\377\140\377\000\377\167\377\000\377\000\125\377\377\000\141\377\377\000\155\377\377\000\171\377"
+        "\377\000\205\377\377\000\221\377\377\000\234\377\377\000\250\377\377\000\264\377\377\000\300\377\377\000\314"
+        "\377\377\000\330\377\377\000\344\377\377\000\360\377\377\000\374\377\377\000\377\357\377\000\377\326\377\000"
+        "\377\276\377\000\377\246\377\000\377\217\377\000\377\167\377\000\377\137\377\000\377\107\377\000\377\060\377"
+        "\000\377\027\377\003\377\003\377\027\377\000\377\060\377\000\377\110\377\000\377\137\377\000\377\170\377\000"
+        "\377\217\377\000\377\000\141\377\377\000\155\377\377\000\171\377\377\000\205\377\377\000\221\377\377\000\234"
+        "\377\377\000\250\377\377\000\264\377\377\000\300\377\377\000\314\377\377\000\330\377\377\000\344\377\377\000"
+        "\360\377\377\000\374\377\377\000\377\357\377\000\377\326\377\000\377\276\377\000\377\246\377\000\377\217\377"
+        "\000\377\167\377\000\377\137\377\000\377\107\377\000\377\060\377\000\377\027\377\003\377\003\377\027\377\000"
+        "\377\060\377\000\377\110\377\000\377\140\377\000\377\167\377\000\377\220\377\000\377\247\377\000\377\000\155"
+        "\377\377\000\170\377\377\000\205\377\377\000\221\377\377\000\234\377\377\000\250\377\377\000\264\377\377\000"
+        "\300\377\377\000\314\377\377\000\330\377\377\000\344\377\377\000\360\377\377\000\374\377\377\000\377\357\377"
+        "\000\377\326\377\000\377\276\377\000\377\246\377\000\377\217\377\000\377\167\377\000\377\137\377\000\377\107"
+        "\377\000\377\060\377\000\377\027\377\003\377\003\377\027\377\000\377\060\377\000\377\110\377\000\377\140\377"
+        "\000\377\170\377\000\377\217\377\000\377\250\377\000\377\277\377\000\377\000\171\377\377\000\204\377\377\000"
+        "\221\377\377\000\234\377\377\000\250\377\377\000\264\377\377\000\300\377\377\000\314\377\377\000\330\377\377"
+        "\000\344\377\377\000\360\377\377\000\374\377\377\000\377\357\377\000\377\326\377\000\377\276\377\000\377\246"
+        "\377\000\377\217\377\000\377\167\377\000\377\137\377\000\377\107\377\000\377\060\377\000\377\027\377\003\377"
+        "\003\377\027\377\000\377\060\377\000\377\110\377\000\377\140\377\000\377\170\377\000\377\217\377\000\377\247"
+        "\377\000\377\300\377\000\377\327\377\000\377\000\205\377\377\000\220\377\377\000\235\377\377\000\250\377\377"
+        "\000\264\377\377\000\300\377\377\000\314\377\377\000\330\377\377\000\344\377\377\000\360\377\377\000\374\377"
+        "\377\000\377\357\377\000\377\326\377\000\377\276\377\000\377\246\377\000\377\217\377\000\377\167\377\000\377"
+        "\137\377\000\377\107\377\000\377\060\377\000\377\027\377\003\377\003\377\027\377\000\377\060\377\000\377\110"
+        "\377\000\377\140\377\000\377\170\377\000\377\217\377\000\377\247\377\000\377\277\377\000\377\327\377\000\377"
+        "\357\377\000\377\000\221\377\377\000\234\377\377\000\251\377\377\000\264\377\377\000\300\377\377\000\314\377"
+        "\377\000\330\377\377\000\344\377\377\000\360\377\377\000\374\377\377\000\377\357\377\000\377\326\377\000\377"
+        "\276\377\000\377\246\377\000\377\217\377\000\377\167\377\000\377\137\377\000\377\107\377\000\377\060\377\000"
+        "\377\027\377\003\377\003\377\027\377\000\377\060\377\000\377\110\377\000\377\140\377\000\377\170\377\000\377"
+        "\217\377\000\377\247\377\000\377\277\377\000\377\327\377\000\377\360\377\000\377\377\367\000\377\000\234\377"
+        "\377\000\250\377\377\000\264\377\377\000\300\377\377\000\314\377\377\000\330\377\377\000\344\377\377\000\360"
+        "\377\377\000\374\377\377\000\377\357\377\000\377\326\377\000\377\276\377\000\377\246\377\000\377\217\377\000"
+        "\377\167\377\000\377\137\377\000\377\107\377\000\377\060\377\000\377\027\377\003\377\003\377\027\377\000\377"
+        "\060\377\000\377\110\377\000\377\140\377\000\377\170\377\000\377\217\377\000\377\247\377\000\377\277\377\000"
+        "\377\327\377\000\377\360\377\000\377\377\367\000\377\377\337\000\377\000\250\377\377\000\264\377\377\000\300"
+        "\377\377\000\314\377\377\000\330\377\377\000\344\377\377\000\360\377\377\000\374\377\377\000\377\357\377\000"
+        "\377\326\377\000\377\276\377\000\377\246\377\000\377\217\377\000\377\167\377\000\377\137\377\000\377\107\377"
+        "\000\377\060\377\000\377\027\377\003\377\003\377\027\377\000\377\060\377\000\377\110\377\000\377\140\377\000"
+        "\377\170\377\000\377\217\377\000\377\247\377\000\377\277\377\000\377\327\377\000\377\360\377\000\377\377\367"
+        "\000\377\377\337\000\377\377\307\000\377\000\264\377\377\000\300\377\377\000\314\377\377\000\330\377\377\000"
+        "\344\377\377\000\360\377\377\000\374\377\377\000\377\357\377\000\377\326\377\000\377\276\377\000\377\246\377"
+        "\000\377\217\377\000\377\167\377\000\377\137\377\000\377\107\377\000\377\060\377\000\377\027\377\003\377\003"
+        "\377\027\377\000\377\060\377\000\377\110\377\000\377\140\377\000\377\170\377\000\377\217\377\000\377\247\377"
+        "\000\377\277\377\000\377\327\377\000\377\360\377\000\377\377\367\000\377\377\340\000\377\377\307\000\377\377"
+        "\260\000\377\000\300\377\377\000\314\377\377\000\330\377\377\000\344\377\377\000\360\377\377\000\374\377\377"
+        "\000\377\357\377\000\377\326\377\000\377\276\377\000\377\246\377\000\377\217\377\000\377\167\377\000\377\137"
+        "\377\000\377\107\377\000\377\060\377\000\377\027\377\003\377\003\377\027\377\000\377\060\377\000\377\110\377"
+        "\000\377\140\377\000\377\170\377\000\377\217\377\000\377\247\377\000\377\277\377\000\377\327\377\000\377\360"
+        "\377\000\377\377\367\000\377\377\337\000\377\377\310\000\377\377\257\000\377\377\230\000\377\000\314\377\377"
+        "\000\330\377\377\000\344\377\377\000\360\377\377\000\374\377\377\000\377\357\377\000\377\326\377\000\377\276"
+        "\377\000\377\246\377\000\377\217\377\000\377\167\377\000\377\137\377\000\377\107\377\000\377\060\377\000\377"
+        "\027\377\003\377\003\377\027\377\000\377\060\377\000\377\110\377\000\377\140\377\000\377\170\377\000\377\217"
+        "\377\000\377\247\377\000\377\277\377\000\377\327\377\000\377\360\377\000\377\377\367\000\377\377\337\000\377"
+        "\377\307\000\377\377\260\000\377\377\230\000\377\377\200\000\377\000\330\377\377\000\344\377\377\000\360\377"
+        "\377\000\374\377\377\000\377\357\377\000\377\326\377\000\377\276\377\000\377\246\377\000\377\217\377\000\377"
+        "\167\377\000\377\137\377\000\377\107\377\000\377\060\377\000\377\027\377\003\377\003\377\027\377\000\377\060"
+        "\377\000\377\110\377\000\377\140\377\000\377\170\377\000\377\217\377\000\377\247\377\000\377\277\377\000\377"
+        "\327\377\000\377\360\377\000\377\377\367\000\377\377\337\000\377\377\307\000\377\377\260\000\377\377\230\000"
+        "\377\377\200\000\377\377\151\000\377\000\344\377\377\000\360\377\377\000\374\377\377\000\377\357\377\000\377"
+        "\326\377\000\377\276\377\000\377\246\377\000\377\217\377\000\377\167\377\000\377\137\377\000\377\107\377\000"
+        "\377\060\377\000\377\027\377\003\377\003\377\027\377\000\377\060\377\000\377\110\377\000\377\140\377\000\377"
+        "\170\377\000\377\217\377\000\377\247\377\000\377\277\377\000\377\327\377\000\377\360\377\000\377\377\367\000"
+        "\377\377\337\000\377\377\307\000\377\377\260\000\377\377\230\000\377\377\201\000\377\377\150\000\377\377\121"
+        "\000\377\000\360\377\377\000\373\377\377\000\377\357\377\000\377\326\377\000\377\276\377\000\377\246\377\000"
+        "\377\217\377\000\377\167\377\000\377\137\377\000\377\107\377\000\377\060\377\000\377\027\377\003\377\003\377"
+        "\027\377\000\377\060\377\000\377\110\377\000\377\140\377\000\377\170\377\000\377\217\377\000\377\247\377\000"
+        "\377\277\377\000\377\327\377\000\377\360\377\000\377\377\367\000\377\377\337\000\377\377\307\000\377\377\260"
+        "\000\377\377\230\000\377\377\200\000\377\377\151\000\377\377\120\000\377\377\071\000\377\000\374\377\377\000"
+        "\377\357\377\000\377\325\377\000\377\276\377\000\377\246\377\000\377\217\377\000\377\167\377\000\377\137\377"
+        "\000\377\107\377\000\377\060\377\000\377\027\377\003\377\003\377\027\377\000\377\060\377\000\377\110\377\000"
+        "\377\140\377\000\377\170\377\000\377\217\377\000\377\247\377\000\377\277\377\000\377\327\377\000\377\360\377"
+        "\000\377\377\367\000\377\377\337\000\377\377\307\000\377\377\260\000\377\377\230\000\377\377\200\000\377\377"
+        "\150\000\377\377\121\000\377\377\071\000\377\377\041\000\377\000\377\356\377\000\377\326\377\000\377\276\377"
+        "\000\377\246\377\000\377\217\377\000\377\167\377\000\377\137\377\000\377\107\377\000\377\060\377\000\377\027"
+        "\377\003\377\003\377\027\377\000\377\060\377\000\377\110\377\000\377\140\377\000\377\170\377\000\377\217\377"
+        "\000\377\247\377\000\377\277\377\000\377\327\377\000\377\360\377\000\377\377\367\000\377\377\337\000\377\377"
+        "\307\000\377\377\260\000\377\377\230\000\377\377\200\000\377\377\150\000\377\377\121\000\377\377\071\000\377"
+        "\377\041\000\377\377\012\000\377\000\377\326\377\000\377\276\377\000\377\246\377\000\377\217\377\000\377\167"
+        "\377\000\377\137\377\000\377\107\377\000\377\060\377\000\377\027\377\003\377\003\377\027\377\000\377\060\377"
+        "\000\377\110\377\000\377\140\377\000\377\170\377\000\377\217\377\000\377\247\377\000\377\277\377\000\377\327"
+        "\377\000\377\360\377\000\377\377\367\000\377\377\337\000\377\377\307\000\377\377\260\000\377\377\230\000\377"
+        "\377\200\000\377\377\150\000\377\377\121\000\377\377\071\000\377\377\041\000\377\377\011\000\377\377\000\015"
+        "\377\000\377\276\377\000\377\247\377\000\377\216\377\000\377\167\377\000\377\137\377\000\377\107\377\000\377"
+        "\060\377\000\377\027\377\003\377\003\377\027\377\000\377\060\377\000\377\110\377\000\377\140\377\000\377\170"
+        "\377\000\377\217\377\000\377\247\377\000\377\277\377\000\377\327\377\000\377\360\377\000\377\377\367\000\377"
+        "\377\337\000\377\377\307\000\377\377\260\000\377\377\230\000\377\377\200\000\377\377\150\000\377\377\121\000"
+        "\377\377\071\000\377\377\041\000\377\377\011\000\377\377\000\016\377\377\000\046\377\000\377\246\377\000\377"
+        "\217\377\000\377\167\377\000\377\137\377\000\377\107\377\000\377\060\377\000\377\027\377\003\377\003\377\027"
+        "\377\000\377\060\377\000\377\110\377\000\377\140\377\000\377\170\377\000\377\217\377\000\377\247\377\000\377"
+        "\277\377\000\377\327\377\000\377\360\377\000\377\377\367\000\377\377\337\000\377\377\307\000\377\377\260\000"
+        "\377\377\230\000\377\377\200\000\377\377\150\000\377\377\121\000\377\377\071\000\377\377\041\000\377\377\011"
+        "\000\377\377\000\015\377\377\000\047\377\377\000\076\377\000\377\216\377\000\377\167\377\000\377\137\377\000"
+        "\377\107\377\000\377\060\377\000\377\027\377\003\377\003\377\027\377\000\377\060\377\000\377\110\377\000\377"
+        "\140\377\000\377\170\377\000\377\217\377\000\377\247\377\000\377\277\377\000\377\327\377\000\377\360\377\000"
+        "\377\377\367\000\377\377\337\000\377\377\307\000\377\377\260\000\377\377\230\000\377\377\200\000\377\377\150"
+        "\000\377\377\121\000\377\377\071\000\377\377\041\000\377\377\011\000\377\377\000\015\377\377\000\046\377\377"
+        "\000\076\377\377\000\126\377\000\377\167\377\000\377\137\377\000\377\107\377\000\377\060\377\000\377\027\377"
+        "\003\377\003\377\027\377\000\377\060\377\000\377\110\377\000\377\140\377\000\377\170\377\000\377\217\377\000"
+        "\377\247\377\000\377\277\377\000\377\327\377\000\377\360\377\000\377\377\367\000\377\377\337\000\377\377\307"
+        "\000\377\377\260\000\377\377\230\000\377\377\200\000\377\377\150\000\377\377\121\000\377\377\071\000\377\377"
+        "\041\000\377\377\011\000\377\377\000\015\377\377\000\046\377\377\000\076\377\377\000\126\377\377\000\155\377"
+        "\000\377\137\377\000\377\110\377\000\377\060\377\000\377\027\377\003\377\003\377\027\377\000\377\060\377\000"
+        "\377\110\377\000\377\140\377\000\377\170\377\000\377\217\377\000\377\247\377\000\377\277\377\000\377\327\377"
+        "\000\377\360\377\000\377\377\367\000\377\377\337\000\377\377\307\000\377\377\260\000\377\377\230\000\377\377"
+        "\200\000\377\377\150\000\377\377\121\000\377\377\071\000\377\377\041\000\377\377\011\000\377\377\000\015\377"
+        "\377\000\046\377\377\000\076\377\377\000\125\377\377\000\156\377\377\000\205\377\000\377\107\377\000\377\060"
+        "\377\000\377\027\377\003\377\003\377\027\377\000\377\060\377\000\377\110\377\000\377\140\377\000\377\170\377"
+        "\000\377\217\377\000\377\247\377\000\377\277\377\000\377\327\377\000\377\360\377\000\377\377\367\000\377\377"
+        "\337\000\377\377\307\000\377\377\260\000\377\377\230\000\377\377\200\000\377\377\150\000\377\377\121\000\377"
+        "\377\071\000\377\377\041\000\377\377\011\000\377\377\000\015\377\377\000\046\377\377\000\076\377\377\000\126"
+        "\377\377\000\155\377\377\000\206\377\377\000\235\377\000\377\060\377\000\377\030\377\002\377\002\377\027\377"
+        "\000\377\060\377\000\377\107\377\000\377\137\377\000\377\167\377\000\377\217\377\000\377\247\377\000\377\277"
+        "\377\000\377\327\377\000\377\360\377\000\377\377\367\000\377\377\340\000\377\377\310\000\377\377\260\000\377"
+        "\377\230\000\377\377\201\000\377\377\151\000\377\377\121\000\377\377\071\000\377\377\041\000\377\377\011\000"
+        "\377\377\000\015\377\377\000\046\377\377\000\076\377\377\000\125\377\377\000\155\377\377\000\205\377\377\000"
+        "\235\377\377\000\264\377\000\377\027\377\003\377\003\377\030\377\000\377\061\377\000\377\110\377\000\377\140"
+        "\377\000\377\170\377\000\377\220\377\000\377\250\377\000\377\300\377\000\377\327\377\000\377\360\377\000\377"
+        "\377\367\000\377\377\337\000\377\377\307\000\377\377\257\000\377\377\230\000\377\377\200\000\377\377\150\000"
+        "\377\377\120\000\377\377\071\000\377\377\041\000\377\377\011\000\377\377\000\016\377\377\000\047\377\377\000"
+        "\076\377\377\000\126\377\377\000\156\377\377\000\206\377\377\000\235\377\377\000\266\377\377\000\315\377\003"
+        "\377\003\377\027\377\000\377\060\377\000\377\110\377\000\377\140\377\000\377\167\377\000\377\217\377\000\377"
+        "\247\377\000\377\277\377\000\377\327\377\000\377\357\377\000\377\377\367\000\377\377\337\000\377\377\307\000"
+        "\377\377\260\000\377\377\230\000\377\377\200\000\377\377\151\000\377\377\121\000\377\377\071\000\377\377\041"
+        "\000\377\377\012\000\377\377\000\015\377\377\000\046\377\377\000\076\377\377\000\126\377\377\000\155\377\377"
+        "\000\205\377\377\000\235\377\377\000\264\377\377\000\315\377\377\000\344\377"
+};
+
+/**
+ * \brief Returns the blending rendering background test image as an SDL_Surface.
+ */
+SDL_Surface *SDLTest_ImageBlendingBackground(void)
+{
+    SDL_Surface *surface = SDL_CreateSurfaceFrom(
+            (void *)SDLTest_imageRainbowBackground.pixel_data,
+            SDLTest_imageRainbowBackground.width,
+            SDLTest_imageRainbowBackground.height,
+            SDLTest_imageRainbowBackground.width * SDLTest_imageRainbowBackground.bytes_per_pixel,
+            SDL_PIXELFORMAT_ARGB8888);
+    return surface;
+}
+
+/* Complex sprite with gradient transparency */
+
+static const SDLTest_SurfaceImage_t SDLTest_imageTransparentSprite = {
+        32,
+        32,
+        4,
+        "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
+        "\000\101\205\101\000\143\152\143\000\143\151\143\003\145\151\145\034\146\150\146\111\146\150\146\132\145\150"
+        "\146\014\146\150\146\000\146\150\146\000\147\147\147\000\145\150\145\042\146\147\146\137\146\150\146\111\145"
+        "\151\145\056\144\152\144\017\151\145\151\000\067\215\076\000\000\000\000\000\000\000\000\000\000\000\000\000"
+        "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
+        "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\125\166\126\000\177\120"
+        "\176\000\147\147\147\117\147\147\147\230\147\147\147\242\147\147\147\233\147\147\147\111\377\000\377\000\143"
+        "\152\143\000\143\152\143\005\146\147\146\120\147\147\147\155\147\147\147\144\147\147\147\135\144\151\144\057"
+        "\176\126\174\000\110\200\113\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
+        "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
+        "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\126\164\127\000\205\115\204\000\146\147\146\154\147"
+        "\147\147\260\147\147\147\243\147\147\147\234\147\147\147\211\146\150\146\047\335\017\335\000\146\150\146\052"
+        "\147\147\147\160\147\147\147\154\147\147\147\144\147\147\147\135\146\150\146\064\203\123\201\000\132\161\134"
+        "\000\135\156\136\000\146\151\145\000\150\146\150\000\135\155\135\000\144\151\144\000\000\000\000\000\000\000"
+        "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\144\152\144\000\126\165\131\000\147\147\147\000\146"
+        "\147\146\000\143\152\143\000\204\120\203\000\156\142\156\000\146\147\146\135\147\147\147\256\147\147\147\243"
+        "\147\147\147\233\147\147\147\224\147\147\147\171\146\150\146\134\147\147\147\155\147\147\147\164\147\147\147"
+        "\154\147\147\147\144\147\147\147\135\146\150\146\065\161\140\161\000\143\152\143\000\120\165\123\001\143\153"
+        "\143\014\143\152\143\013\152\146\153\000\145\147\145\000\146\146\146\000\000\000\000\000\000\000\000\000\000"
+        "\000\000\000\133\161\133\000\101\207\104\000\150\146\150\000\146\150\146\045\146\150\146\046\141\154\141\003"
+        "\147\147\147\000\150\146\150\000\146\150\146\126\147\147\147\256\147\147\147\243\147\147\147\233\147\147\147"
+        "\223\147\147\147\214\147\147\147\206\147\147\147\174\147\147\147\163\147\147\147\154\147\147\147\144\147\147"
+        "\147\135\146\150\146\101\142\153\142\014\143\152\143\013\145\150\145\043\147\150\147\060\147\147\147\050\147"
+        "\147\147\013\147\152\147\000\143\150\143\000\133\161\134\000\000\000\000\000\000\000\000\000\150\146\150\000"
+        "\147\147\147\000\147\147\147\046\147\147\147\264\147\147\147\301\147\147\147\202\146\150\146\072\146\150\146"
+        "\071\147\147\147\222\147\147\147\255\147\147\147\243\147\147\147\234\147\147\147\225\147\147\147\216\147\147"
+        "\147\206\147\147\147\176\147\147\147\165\147\147\147\155\147\147\147\144\147\147\147\134\147\147\147\123\146"
+        "\150\146\103\146\147\146\074\147\147\147\074\147\147\147\064\147\147\147\054\147\147\147\040\146\150\146\011"
+        "\152\145\152\000\132\162\133\000\000\000\000\000\000\000\000\000\147\147\147\000\146\150\146\024\147\147\147"
+        "\243\147\147\147\336\147\147\147\325\147\147\147\316\147\147\147\275\147\147\147\264\147\147\147\265\147\147"
+        "\147\254\147\147\147\246\147\147\147\227\147\147\147\174\147\147\147\137\146\150\146\120\146\150\146\113\146"
+        "\147\146\117\146\147\146\132\147\147\147\141\147\147\147\135\147\147\147\124\147\147\147\114\147\146\147\104"
+        "\147\147\147\074\147\147\147\064\147\147\147\054\147\147\147\044\145\151\145\015\154\144\153\000\125\166\130"
+        "\000\000\000\000\000\000\000\000\000\147\147\147\000\146\150\146\057\147\147\147\320\147\147\147\335\147\147"
+        "\147\323\147\147\147\313\147\147\147\304\147\147\147\274\147\147\147\265\147\147\147\250\147\147\147\163\146"
+        "\150\146\061\144\151\145\016\137\155\140\002\170\133\212\000\170\127\213\000\134\160\134\002\143\152\143\012"
+        "\145\150\146\037\146\150\146\100\147\147\147\122\147\147\147\114\147\147\147\104\147\147\147\074\147\147\147"
+        "\064\147\147\147\054\146\150\146\035\141\154\141\003\142\152\142\000\134\161\135\000\000\000\000\000\000\000"
+        "\000\000\146\150\146\000\144\152\144\001\147\147\147\151\147\147\147\330\147\147\147\324\147\147\147\313\147"
+        "\147\147\303\147\147\147\275\147\147\147\244\147\147\146\110\143\150\133\006\163\162\231\000\202\204\275\000"
+        "\236\240\375\000\140\144\231\002\144\145\237\003\245\252\377\000\166\167\255\000\152\152\174\000\141\154\141"
+        "\004\146\150\146\042\147\147\147\105\147\147\147\104\147\147\147\074\147\147\147\064\147\147\147\052\144\151"
+        "\144\014\150\146\147\000\162\130\162\000\000\000\000\000\000\000\000\000\000\000\000\000\146\150\146\000\146"
+        "\147\146\000\146\150\146\012\147\147\147\215\147\147\147\325\147\147\147\313\147\147\147\305\147\147\147\253"
+        "\146\150\146\071\161\152\222\000\162\162\274\011\174\173\311\053\177\176\314\110\201\201\321\115\202\202\322"
+        "\127\202\202\322\126\173\172\307\101\167\167\300\041\170\167\302\010\213\217\320\000\157\143\213\000\146\147"
+        "\146\026\147\147\147\075\147\147\147\074\147\147\147\064\147\150\147\050\142\153\142\006\150\147\150\000\146"
+        "\150\146\000\144\151\144\000\135\151\135\000\150\145\147\000\133\160\133\000\142\153\142\000\147\147\147\000"
+        "\146\147\146\130\147\147\147\323\147\147\147\314\147\147\147\277\147\147\147\117\166\161\240\000\163\161\271"
+        "\032\202\201\321\163\176\176\314\216\200\200\320\217\204\204\326\214\201\201\321\203\177\177\316\173\203\203"
+        "\324\165\200\200\320\150\175\175\312\120\175\174\313\054\147\144\245\007\164\155\237\000\145\150\145\033\147"
+        "\147\147\072\147\147\147\064\147\147\147\054\145\151\145\031\143\152\144\014\142\152\142\010\134\157\134\004"
+        "\131\154\131\001\150\146\150\000\155\143\155\000\143\152\143\006\145\150\145\033\147\147\147\237\147\147\147"
+        "\326\147\147\147\316\147\147\147\212\137\143\116\007\165\163\276\032\174\173\310\173\206\206\331\243\176\176"
+        "\314\222\177\177\315\214\203\203\324\210\201\201\321\200\205\205\330\173\202\202\323\163\176\176\313\154\176"
+        "\176\314\144\177\177\315\134\172\171\304\073\172\167\306\011\130\150\106\002\146\150\146\051\147\147\147\065"
+        "\147\147\147\054\147\147\147\044\147\150\147\034\146\147\146\024\145\146\145\014\141\147\141\004\146\147\146"
+        "\113\147\147\147\211\147\147\147\250\147\147\147\302\147\147\147\330\147\147\147\324\147\147\147\306\146\147"
+        "\144\077\177\175\325\031\177\176\315\204\205\205\330\246\202\202\322\241\202\202\323\227\200\200\317\217\201"
+        "\201\320\211\201\201\321\202\211\211\337\173\203\203\324\163\200\200\317\154\203\203\324\144\175\175\312\134"
+        "\174\174\310\124\171\171\304\071\156\153\272\006\144\151\142\022\147\147\147\063\147\147\147\054\147\147\147"
+        "\044\150\150\150\034\146\146\146\024\146\146\146\014\143\147\143\004\147\147\147\305\147\147\147\371\147\147"
+        "\147\357\147\147\147\345\147\147\147\333\147\147\147\325\147\147\147\255\141\143\133\024\173\173\307\140\204"
+        "\204\326\264\210\210\334\252\200\200\317\233\205\205\330\233\203\203\324\223\202\202\322\212\205\205\330\203"
+        "\204\204\326\172\201\201\321\163\203\203\325\154\204\204\326\143\177\177\315\134\200\200\317\124\171\171\304"
+        "\112\162\161\270\031\132\152\114\005\146\150\146\053\147\147\147\054\147\147\147\044\150\150\150\034\146\146"
+        "\146\024\146\146\146\014\143\144\143\005\147\147\147\340\147\147\147\365\147\147\147\353\147\147\147\343\147"
+        "\147\147\333\147\147\147\326\147\147\146\217\155\160\236\016\176\176\314\211\204\204\326\265\211\211\337\252"
+        "\203\203\324\235\205\205\327\233\204\204\326\223\205\205\330\213\207\207\333\203\204\204\326\173\205\205\327"
+        "\163\201\201\320\153\176\176\313\143\203\203\323\134\204\204\325\124\201\201\320\115\171\170\302\053\062\123"
+        "\024\001\145\151\145\043\147\147\147\055\147\147\147\044\150\150\150\034\146\146\146\024\145\147\145\013\143"
+        "\147\143\003\147\147\147\331\147\147\147\364\147\147\147\356\147\147\147\344\147\147\147\333\147\147\147\327"
+        "\147\147\146\176\171\172\305\015\203\203\325\227\202\202\323\260\210\210\334\250\202\202\323\231\205\205\327"
+        "\234\204\204\327\223\204\204\325\212\204\204\326\201\203\203\323\173\200\200\317\164\177\177\316\153\201\201"
+        "\320\143\205\205\327\134\205\205\327\124\176\176\313\115\174\173\310\063\142\146\237\002\146\150\145\037\147"
+        "\147\147\055\147\147\147\044\147\150\147\032\144\152\144\014\140\152\140\002\036\233\036\000\146\150\146\054"
+        "\147\147\147\150\147\147\147\254\147\147\147\331\147\147\147\334\147\147\147\327\147\147\147\177\150\156\255"
+        "\003\201\201\321\176\177\177\315\261\206\206\330\251\203\203\323\234\202\202\323\233\203\203\324\223\205\205"
+        "\330\213\203\203\325\203\206\206\331\174\200\200\316\163\177\177\316\153\203\203\324\144\200\200\316\134\201"
+        "\201\321\124\200\200\316\114\202\202\323\067\153\154\254\004\145\150\145\037\147\147\147\055\147\147\147\044"
+        "\145\152\145\025\067\212\073\000\136\155\136\000\105\177\105\000\147\147\146\000\151\146\150\000\144\151\145"
+        "\010\147\147\147\171\147\147\147\335\147\147\147\326\147\147\147\221\104\124\011\003\177\176\315\103\206\206"
+        "\332\244\206\206\331\254\202\202\323\234\206\206\331\230\202\202\323\223\205\205\327\213\202\202\323\202\203"
+        "\203\324\171\205\205\327\163\201\201\320\154\176\176\314\144\201\201\320\134\205\205\330\124\201\201\320\115"
+        "\202\201\322\053\072\132\047\001\145\151\145\044\147\147\147\055\147\147\147\044\146\152\146\026\134\160\135"
+        "\002\145\154\144\000\072\203\072\000\136\157\137\000\154\143\153\000\147\147\147\000\146\147\146\103\147\147"
+        "\147\327\147\147\147\325\147\147\147\256\145\150\145\025\143\170\000\000\177\176\315\057\203\203\324\231\205"
+        "\205\327\240\176\176\313\217\201\201\321\220\174\174\310\211\174\174\311\201\200\200\320\170\176\176\314\162"
+        "\200\200\317\153\207\207\333\143\202\202\323\134\176\176\314\124\174\174\310\103\173\173\310\020\134\151\124"
+        "\005\146\150\146\054\147\147\147\054\147\147\147\044\150\150\150\034\144\147\144\017\140\151\140\003\227\076"
+        "\227\000\147\147\147\000\146\147\146\000\143\151\144\003\147\147\147\155\147\147\147\332\147\147\147\324\147"
+        "\147\147\307\147\147\147\103\150\147\161\000\137\133\225\003\174\173\307\163\202\202\322\246\203\203\324\227"
+        "\202\202\322\220\202\202\322\210\177\177\316\202\177\177\316\172\200\200\317\163\205\205\327\153\177\177\316"
+        "\142\201\201\320\134\175\174\311\120\162\160\266\036\166\166\233\000\144\151\144\023\147\147\147\063\147\147"
+        "\147\054\147\147\147\044\150\150\150\034\146\146\146\024\144\147\144\013\142\153\142\002\146\147\146\000\146"
+        "\150\146\007\147\147\147\160\147\147\147\332\147\147\147\334\147\147\147\323\147\147\147\316\147\147\147\216"
+        "\145\150\145\012\155\155\223\000\163\162\271\045\203\202\323\202\204\204\326\201\205\205\330\152\211\211\336"
+        "\212\203\203\324\203\200\200\316\173\203\203\324\163\201\201\320\154\200\200\316\144\176\176\314\134\172\171"
+        "\304\060\126\111\235\001\140\154\134\003\146\150\146\052\147\147\147\065\147\147\147\054\147\147\147\044\150"
+        "\150\150\034\146\146\146\024\146\146\146\014\142\150\142\003\222\076\212\000\147\147\147\157\147\147\147\346"
+        "\147\147\147\344\147\147\147\333\147\147\147\323\147\147\147\314\147\147\147\300\147\147\147\124\155\143\156"
+        "\000\202\204\302\000\172\167\304\020\165\163\275\017\166\164\277\013\203\203\324\123\204\203\325\172\205\205"
+        "\327\175\200\200\317\164\176\176\314\155\166\166\276\142\164\164\273\074\152\151\254\006\170\145\246\000\145"
+        "\150\145\035\147\147\147\073\147\147\147\064\147\147\147\054\147\147\147\044\150\150\150\034\147\146\147\024"
+        "\145\146\145\013\135\152\135\001\151\145\151\000\147\147\147\162\147\147\147\354\147\147\147\343\147\147\147"
+        "\334\147\147\147\325\147\147\147\314\147\147\147\304\147\147\147\255\146\150\147\076\155\142\155\000\161\161"
+        "\233\000\167\165\301\000\173\171\306\000\142\140\233\004\173\172\307\041\203\203\324\104\200\177\317\110\201"
+        "\200\320\102\176\175\313\046\170\164\306\005\172\147\252\000\143\151\144\031\146\147\146\076\147\147\147\074"
+        "\147\147\147\064\146\150\146\047\145\151\146\031\146\151\146\026\145\147\145\021\144\151\145\010\074\205\103"
+        "\000\147\147\147\000\147\147\147\034\147\147\147\304\147\147\147\347\147\147\147\323\147\147\147\271\147\147"
+        "\147\274\147\147\147\305\147\147\147\275\147\147\147\246\147\147\147\115\144\151\145\011\150\147\150\000\145"
+        "\150\145\000\146\152\212\000\200\200\315\000\257\261\377\000\000\000\011\000\257\306\304\000\167\166\237\000"
+        "\140\152\131\004\146\151\146\045\147\147\147\106\147\147\147\104\147\147\147\074\147\147\147\060\144\152\144"
+        "\015\056\226\063\000\132\163\132\001\134\160\134\002\137\156\137\001\150\143\150\000\141\154\141\000\151\144"
+        "\151\000\147\147\147\111\147\147\147\147\146\147\146\072\146\150\146\031\147\147\147\074\147\147\147\254\147"
+        "\147\147\274\147\147\147\264\147\147\147\251\147\147\147\170\146\150\146\066\145\150\145\021\141\154\141\004"
+        "\036\243\037\000\017\276\022\000\137\156\137\003\144\152\144\014\145\150\145\043\146\150\146\102\147\147\147"
+        "\122\147\147\147\114\147\147\147\104\147\147\147\074\146\150\146\053\140\154\140\004\136\155\137\000\131\164"
+        "\131\000\134\160\134\000\137\155\137\000\153\141\153\000\145\151\145\000\144\152\144\000\151\145\151\000\150"
+        "\146\150\000\147\147\147\000\146\150\146\000\147\147\147\000\147\150\146\130\147\147\147\274\147\147\147\263"
+        "\147\147\147\254\147\147\147\245\147\147\147\231\147\147\147\177\147\147\146\145\147\147\147\122\147\147\147"
+        "\115\146\147\146\123\147\147\147\135\147\147\147\142\147\147\147\135\147\147\147\124\147\147\147\114\147\147"
+        "\147\104\147\147\147\074\147\147\147\062\145\151\145\015\146\147\146\000\137\153\140\000\000\000\000\000\000"
+        "\000\000\000\000\000\000\000\000\000\000\000\134\160\135\000\133\161\134\000\127\163\130\000\131\162\132\000"
+        "\075\206\100\000\152\145\152\000\147\147\147\141\147\147\147\276\147\147\147\263\147\147\147\253\147\147\147"
+        "\243\147\147\147\234\147\147\147\225\147\147\147\216\147\147\147\206\147\147\147\176\147\147\147\165\147\147"
+        "\147\154\147\147\147\144\147\147\147\135\147\147\147\125\147\147\147\114\146\146\146\104\147\147\147\074\147"
+        "\147\147\064\145\150\146\034\106\176\114\000\134\156\135\000\000\000\000\000\000\000\000\000\000\000\000\000"
+        "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\144\151\144\000\144\151\144"
+        "\006\147\147\147\214\147\147\147\276\147\147\147\263\147\147\147\254\147\147\147\243\147\147\147\221\147\147"
+        "\147\220\147\147\147\214\147\147\147\203\147\147\147\173\147\147\147\164\147\147\147\154\147\147\147\137\146"
+        "\150\146\100\146\150\146\057\146\147\146\104\147\147\147\105\147\147\147\074\147\147\147\065\145\150\146\042"
+        "\135\155\136\002\136\155\137\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
+        "\000\000\000\000\000\000\000\000\000\000\000\000\000\146\150\146\000\146\150\146\027\147\147\147\251\147\147"
+        "\147\277\147\147\147\264\147\147\147\254\147\147\147\152\145\151\145\037\146\150\146\054\147\147\147\145\147"
+        "\147\147\205\147\147\147\173\147\147\147\164\147\147\147\155\146\150\146\070\132\160\134\002\172\130\171\000"
+        "\145\150\145\023\146\147\146\067\147\147\147\074\146\150\146\046\143\152\144\011\175\141\167\000\133\155\136"
+        "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
+        "\000\000\000\000\000\000\146\150\146\000\145\150\146\007\147\147\147\116\147\147\147\234\147\147\147\263\147"
+        "\147\147\160\145\151\145\015\146\150\146\000\147\147\147\000\146\150\146\052\147\147\147\200\147\147\147\174"
+        "\147\147\147\164\147\147\147\152\145\150\145\040\146\150\146\000\134\160\134\000\147\146\147\000\143\152\143"
+        "\013\144\152\144\031\142\154\142\005\145\150\146\000\067\200\077\000\131\156\135\000\000\000\000\000\000\000"
+        "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\146"
+        "\150\146\000\146\150\146\000\152\145\152\000\146\150\146\030\147\147\147\103\145\150\145\017\146\147\146\000"
+        "\150\146\150\000\144\151\145\000\144\151\144\015\147\147\147\155\147\147\147\175\147\147\147\165\147\147\147"
+        "\143\144\151\144\021\144\151\145\000\131\162\131\000\375\000\374\000\146\147\146\000\155\142\154\000\143\152"
+        "\144\000\150\147\150\000\116\176\116\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
+        "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\142\153\142\000"
+        "\124\166\124\000\147\150\147\000\150\146\150\000\146\147\146\000\150\146\150\000\120\170\120\000\136\156\136"
+        "\000\115\167\115\000\146\150\146\115\146\147\146\170\146\147\146\151\146\150\146\110\143\152\143\005\142\152"
+        "\143\000\000\000\000\000\072\212\100\000\073\213\077\000\073\213\076\000\076\220\070\000\000\000\000\000\000"
+        "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
+};
+
+/**
+ * \brief Returns the blending rendering sprite test image as an SDL_Surface.
+ */
+SDL_Surface *SDLTest_ImageBlendingSprite(void)
+{
+    SDL_Surface *surface = SDL_CreateSurfaceFrom(
+            (void *)SDLTest_imageTransparentSprite.pixel_data,
+            SDLTest_imageTransparentSprite.width,
+            SDLTest_imageTransparentSprite.height,
+            SDLTest_imageTransparentSprite.width * SDLTest_imageTransparentSprite.bytes_per_pixel,
+            SDL_PIXELFORMAT_ARGB8888);
+    return surface;
+}

+ 2 - 0
test/testautomation_images.h

@@ -34,3 +34,5 @@ SDL_Surface *SDLTest_ImageBlitBlendAll(void);
 SDL_Surface *SDLTest_ImageFace(void);
 SDL_Surface *SDLTest_ImagePrimitives(void);
 SDL_Surface *SDLTest_ImagePrimitivesBlend(void);
+SDL_Surface *SDLTest_ImageBlendingBackground(void);
+SDL_Surface *SDLTest_ImageBlendingSprite(void);

+ 1 - 0
test/testautomation_suites.h

@@ -39,5 +39,6 @@ extern SDLTest_TestSuiteReference surfaceTestSuite;
 extern SDLTest_TestSuiteReference timeTestSuite;
 extern SDLTest_TestSuiteReference timerTestSuite;
 extern SDLTest_TestSuiteReference videoTestSuite;
+extern SDLTest_TestSuiteReference blitTestSuite;
 
 #endif