SDL  2.0
SDL_test_images.h File Reference
#include "SDL.h"
#include "begin_code.h"
#include "close_code.h"
+ Include dependency graph for SDL_test_images.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SDLTest_SurfaceImage_s
 

Functions

SDL_SurfaceSDLTest_ImageBlit (void)
 Returns the Blit test image as SDL_Surface. More...
 
SDL_SurfaceSDLTest_ImageBlitColor (void)
 Returns the BlitColor test image as SDL_Surface. More...
 
SDL_SurfaceSDLTest_ImageBlitAlpha (void)
 Returns the BlitAlpha test image as SDL_Surface. More...
 
SDL_SurfaceSDLTest_ImageBlitBlendAdd (void)
 Returns the BlitBlendAdd test image as SDL_Surface. More...
 
SDL_SurfaceSDLTest_ImageBlitBlend (void)
 Returns the BlitBlend test image as SDL_Surface. More...
 
SDL_SurfaceSDLTest_ImageBlitBlendMod (void)
 Returns the BlitBlendMod test image as SDL_Surface. More...
 
SDL_SurfaceSDLTest_ImageBlitBlendNone (void)
 Returns the BlitBlendNone test image as SDL_Surface. More...
 
SDL_SurfaceSDLTest_ImageBlitBlendAll (void)
 Returns the BlitBlendAll test image as SDL_Surface. More...
 
SDL_SurfaceSDLTest_ImageFace (void)
 Returns the Face test image as SDL_Surface. More...
 
SDL_SurfaceSDLTest_ImagePrimitives (void)
 Returns the Primitives test image as SDL_Surface. More...
 
SDL_SurfaceSDLTest_ImagePrimitivesBlend (void)
 Returns the PrimitivesBlend test image as SDL_Surface. More...
 

Detailed Description

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_images.h.

Function Documentation

◆ SDLTest_ImageBlit()

SDL_Surface* SDLTest_ImageBlit ( void  )

Returns the Blit test image as SDL_Surface.

Definition at line 541 of file SDL_test_imageBlit.c.

542 {
544  (void*)SDLTest_imageBlit.pixel_data,
545  SDLTest_imageBlit.width,
546  SDLTest_imageBlit.height,
547  SDLTest_imageBlit.bytes_per_pixel * 8,
548  SDLTest_imageBlit.width * SDLTest_imageBlit.bytes_per_pixel,
550  0xff000000, /* Red bit mask. */
551  0x00ff0000, /* Green bit mask. */
552  0x0000ff00, /* Blue bit mask. */
553  0x000000ff /* Alpha bit mask. */
554 #else
555  0x000000ff, /* Red bit mask. */
556  0x0000ff00, /* Green bit mask. */
557  0x00ff0000, /* Blue bit mask. */
558  0xff000000 /* Alpha bit mask. */
559 #endif
560  );
561  return surface;
562 }

References endif, if, SDL_BIG_ENDIAN, SDL_BYTEORDER, SDL_CreateRGBSurfaceFrom, and SDLTest_imageBlit.

Referenced by _surfaceSetUp(), render_testBlit(), and surface_testBlit().

◆ SDLTest_ImageBlitAlpha()

SDL_Surface* SDLTest_ImageBlitAlpha ( void  )

Returns the BlitAlpha test image as SDL_Surface.

Definition at line 1536 of file SDL_test_imageBlit.c.

1537 {
1539  (void*)SDLTest_imageBlitAlpha.pixel_data,
1540  SDLTest_imageBlitAlpha.width,
1541  SDLTest_imageBlitAlpha.height,
1542  SDLTest_imageBlitAlpha.bytes_per_pixel * 8,
1543  SDLTest_imageBlitAlpha.width * SDLTest_imageBlitAlpha.bytes_per_pixel,
1545  0xff000000, /* Red bit mask. */
1546  0x00ff0000, /* Green bit mask. */
1547  0x0000ff00, /* Blue bit mask. */
1548  0x000000ff /* Alpha bit mask. */
1549 #else
1550  0x000000ff, /* Red bit mask. */
1551  0x0000ff00, /* Green bit mask. */
1552  0x00ff0000, /* Blue bit mask. */
1553  0xff000000 /* Alpha bit mask. */
1554 #endif
1555  );
1556  return surface;
1557 }

References endif, if, SDL_BIG_ENDIAN, SDL_BYTEORDER, SDL_CreateRGBSurfaceFrom, and SDLTest_imageBlitAlpha.

Referenced by render_testBlitAlpha(), and surface_testBlitAlphaMod().

◆ SDLTest_ImageBlitBlend()

SDL_Surface* SDLTest_ImageBlitBlend ( void  )

Returns the BlitBlend test image as SDL_Surface.

Definition at line 1111 of file SDL_test_imageBlitBlend.c.

1112 {
1114  (void*)SDLTest_imageBlitBlend.pixel_data,
1115  SDLTest_imageBlitBlend.width,
1116  SDLTest_imageBlitBlend.height,
1117  SDLTest_imageBlitBlend.bytes_per_pixel * 8,
1118  SDLTest_imageBlitBlend.width * SDLTest_imageBlitBlend.bytes_per_pixel,
1120  0xff000000, /* Red bit mask. */
1121  0x00ff0000, /* Green bit mask. */
1122  0x0000ff00, /* Blue bit mask. */
1123  0x000000ff /* Alpha bit mask. */
1124 #else
1125  0x000000ff, /* Red bit mask. */
1126  0x0000ff00, /* Green bit mask. */
1127  0x00ff0000, /* Blue bit mask. */
1128  0xff000000 /* Alpha bit mask. */
1129 #endif
1130  );
1131  return surface;
1132 }

References endif, if, SDL_BIG_ENDIAN, SDL_BYTEORDER, SDL_CreateRGBSurfaceFrom, and SDLTest_imageBlitBlend.

Referenced by render_testBlitBlend(), and surface_testBlitBlendBlend().

◆ SDLTest_ImageBlitBlendAdd()

SDL_Surface* SDLTest_ImageBlitBlendAdd ( void  )

Returns the BlitBlendAdd test image as SDL_Surface.

Definition at line 581 of file SDL_test_imageBlitBlend.c.

582 {
584  (void*)SDLTest_imageBlitBlendAdd.pixel_data,
587  SDLTest_imageBlitBlendAdd.bytes_per_pixel * 8,
590  0xff000000, /* Red bit mask. */
591  0x00ff0000, /* Green bit mask. */
592  0x0000ff00, /* Blue bit mask. */
593  0x000000ff /* Alpha bit mask. */
594 #else
595  0x000000ff, /* Red bit mask. */
596  0x0000ff00, /* Green bit mask. */
597  0x00ff0000, /* Blue bit mask. */
598  0xff000000 /* Alpha bit mask. */
599 #endif
600  );
601  return surface;
602 }

References endif, if, SDL_BIG_ENDIAN, SDL_BYTEORDER, SDL_CreateRGBSurfaceFrom, and SDLTest_imageBlitBlendAdd.

Referenced by render_testBlitBlend(), and surface_testBlitBlendAdd().

◆ SDLTest_ImageBlitBlendAll()

SDL_Surface* SDLTest_ImageBlitBlendAll ( void  )

Returns the BlitBlendAll test image as SDL_Surface.

Definition at line 2822 of file SDL_test_imageBlitBlend.c.

2823 {
2825  (void*)SDLTest_imageBlitBlendAll.pixel_data,
2828  SDLTest_imageBlitBlendAll.bytes_per_pixel * 8,
2829  SDLTest_imageBlitBlendAll.width * SDLTest_imageBlitBlendAll.bytes_per_pixel,
2831  0xff000000, /* Red bit mask. */
2832  0x00ff0000, /* Green bit mask. */
2833  0x0000ff00, /* Blue bit mask. */
2834  0x000000ff /* Alpha bit mask. */
2835 #else
2836  0x000000ff, /* Red bit mask. */
2837  0x0000ff00, /* Green bit mask. */
2838  0x00ff0000, /* Blue bit mask. */
2839  0xff000000 /* Alpha bit mask. */
2840 #endif
2841  );
2842  return surface;
2843 }

References endif, if, SDL_BIG_ENDIAN, SDL_BYTEORDER, SDL_CreateRGBSurfaceFrom, and SDLTest_imageBlitBlendAll.

Referenced by render_testBlitBlend(), and surface_testBlitBlendLoop().

◆ SDLTest_ImageBlitBlendMod()

SDL_Surface* SDLTest_ImageBlitBlendMod ( void  )

Returns the BlitBlendMod test image as SDL_Surface.

Definition at line 1541 of file SDL_test_imageBlitBlend.c.

1542 {
1544  (void*)SDLTest_imageBlitBlendMod.pixel_data,
1547  SDLTest_imageBlitBlendMod.bytes_per_pixel * 8,
1548  SDLTest_imageBlitBlendMod.width * SDLTest_imageBlitBlendMod.bytes_per_pixel,
1550  0xff000000, /* Red bit mask. */
1551  0x00ff0000, /* Green bit mask. */
1552  0x0000ff00, /* Blue bit mask. */
1553  0x000000ff /* Alpha bit mask. */
1554 #else
1555  0x000000ff, /* Red bit mask. */
1556  0x0000ff00, /* Green bit mask. */
1557  0x00ff0000, /* Blue bit mask. */
1558  0xff000000 /* Alpha bit mask. */
1559 #endif
1560  );
1561  return surface;
1562 }

References endif, if, SDL_BIG_ENDIAN, SDL_BYTEORDER, SDL_CreateRGBSurfaceFrom, and SDLTest_imageBlitBlendMod.

Referenced by render_testBlitBlend(), and surface_testBlitBlendMod().

◆ SDLTest_ImageBlitBlendNone()

SDL_Surface* SDLTest_ImageBlitBlendNone ( void  )

Returns the BlitBlendNone test image as SDL_Surface.

Definition at line 2354 of file SDL_test_imageBlitBlend.c.

2355 {
2357  (void*)SDLTest_imageBlitBlendNone.pixel_data,
2360  SDLTest_imageBlitBlendNone.bytes_per_pixel * 8,
2363  0xff000000, /* Red bit mask. */
2364  0x00ff0000, /* Green bit mask. */
2365  0x0000ff00, /* Blue bit mask. */
2366  0x000000ff /* Alpha bit mask. */
2367 #else
2368  0x000000ff, /* Red bit mask. */
2369  0x0000ff00, /* Green bit mask. */
2370  0x00ff0000, /* Blue bit mask. */
2371  0xff000000 /* Alpha bit mask. */
2372 #endif
2373  );
2374  return surface;
2375 }

References endif, if, SDL_BIG_ENDIAN, SDL_BYTEORDER, SDL_CreateRGBSurfaceFrom, and SDLTest_imageBlitBlendNone.

Referenced by render_testBlitBlend(), and surface_testBlitBlendNone().

◆ SDLTest_ImageBlitColor()

SDL_Surface* SDLTest_ImageBlitColor ( void  )

Returns the BlitColor test image as SDL_Surface.

Definition at line 1024 of file SDL_test_imageBlit.c.

1025 {
1027  (void*)SDLTest_imageBlitColor.pixel_data,
1028  SDLTest_imageBlitColor.width,
1029  SDLTest_imageBlitColor.height,
1030  SDLTest_imageBlitColor.bytes_per_pixel * 8,
1031  SDLTest_imageBlitColor.width * SDLTest_imageBlitColor.bytes_per_pixel,
1033  0xff000000, /* Red bit mask. */
1034  0x00ff0000, /* Green bit mask. */
1035  0x0000ff00, /* Blue bit mask. */
1036  0x000000ff /* Alpha bit mask. */
1037 #else
1038  0x000000ff, /* Red bit mask. */
1039  0x0000ff00, /* Green bit mask. */
1040  0x00ff0000, /* Blue bit mask. */
1041  0xff000000 /* Alpha bit mask. */
1042 #endif
1043  );
1044  return surface;
1045 }

References endif, if, SDL_BIG_ENDIAN, SDL_BYTEORDER, SDL_CreateRGBSurfaceFrom, and SDLTest_imageBlitColor.

Referenced by render_testBlitColor(), and surface_testBlitColorMod().

◆ SDLTest_ImageFace()

SDL_Surface* SDLTest_ImageFace ( void  )

Returns the Face test image as SDL_Surface.

Definition at line 224 of file SDL_test_imageFace.c.

225 {
227  (void*)SDLTest_imageFace.pixel_data,
228  SDLTest_imageFace.width,
229  SDLTest_imageFace.height,
230  SDLTest_imageFace.bytes_per_pixel * 8,
231  SDLTest_imageFace.width * SDLTest_imageFace.bytes_per_pixel,
233  0xff000000, /* Red bit mask. */
234  0x00ff0000, /* Green bit mask. */
235  0x0000ff00, /* Blue bit mask. */
236  0x000000ff /* Alpha bit mask. */
237 #else
238  0x000000ff, /* Red bit mask. */
239  0x0000ff00, /* Green bit mask. */
240  0x00ff0000, /* Blue bit mask. */
241  0xff000000 /* Alpha bit mask. */
242 #endif
243  );
244  return surface;
245 }

References endif, if, SDL_BIG_ENDIAN, SDL_BYTEORDER, SDL_CreateRGBSurfaceFrom, and SDLTest_imageFace.

Referenced by _loadTestFace(), _testBlitBlendMode(), mouse_createFreeColorCursor(), surface_testCompleteSurfaceConversion(), surface_testSaveLoadBitmap(), and surface_testSurfaceConversion().

◆ SDLTest_ImagePrimitives()

SDL_Surface* SDLTest_ImagePrimitives ( void  )

Returns the Primitives test image as SDL_Surface.

Definition at line 491 of file SDL_test_imagePrimitives.c.

492 {
494  (void*)SDLTest_imagePrimitives.pixel_data,
497  SDLTest_imagePrimitives.bytes_per_pixel * 8,
498  SDLTest_imagePrimitives.width * SDLTest_imagePrimitives.bytes_per_pixel,
500  0xff000000, /* Red bit mask. */
501  0x00ff0000, /* Green bit mask. */
502  0x0000ff00, /* Blue bit mask. */
503  0x000000ff /* Alpha bit mask. */
504 #else
505  0x000000ff, /* Red bit mask. */
506  0x0000ff00, /* Green bit mask. */
507  0x00ff0000, /* Blue bit mask. */
508  0xff000000 /* Alpha bit mask. */
509 #endif
510  );
511  return surface;
512 }

References endif, if, SDL_BIG_ENDIAN, SDL_BYTEORDER, SDL_CreateRGBSurfaceFrom, and SDLTest_imagePrimitives.

Referenced by render_testPrimitives().

◆ SDLTest_ImagePrimitivesBlend()

SDL_Surface* SDLTest_ImagePrimitivesBlend ( void  )

Returns the PrimitivesBlend test image as SDL_Surface.

Definition at line 673 of file SDL_test_imagePrimitivesBlend.c.

674 {
676  (void*)SDLTest_imagePrimitivesBlend.pixel_data,
679  SDLTest_imagePrimitivesBlend.bytes_per_pixel * 8,
682  0xff000000, /* Red bit mask. */
683  0x00ff0000, /* Green bit mask. */
684  0x0000ff00, /* Blue bit mask. */
685  0x000000ff /* Alpha bit mask. */
686 #else
687  0x000000ff, /* Red bit mask. */
688  0x0000ff00, /* Green bit mask. */
689  0x00ff0000, /* Blue bit mask. */
690  0xff000000 /* Alpha bit mask. */
691 #endif
692  );
693  return surface;
694 }

References endif, if, SDL_BIG_ENDIAN, SDL_BYTEORDER, SDL_CreateRGBSurfaceFrom, and SDLTest_imagePrimitivesBlend.

Referenced by render_testPrimitivesBlend().

SDLTest_imageBlitBlendAll
static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAll
Definition: SDL_test_imageBlitBlend.c:2377
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:70
if
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
Definition: pixman-arm-neon-asm.h:469
surface
EGLSurface surface
Definition: eglext.h:248
endif
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld endif[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld_src SRC pixld MASK if DST_R else pixld DST_R endif if
Definition: pixman-arm-neon-asm.h:549
SDLTest_imageBlitBlend
static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlend
Definition: SDL_test_imageBlitBlend.c:604
SDLTest_imageBlitAlpha
static const SDLTest_SurfaceImage_t SDLTest_imageBlitAlpha
Definition: SDL_test_imageBlit.c:1047
SDLTest_imageBlitBlendAdd
static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAdd
Definition: SDL_test_imageBlitBlend.c:27
SDL_BIG_ENDIAN
#define SDL_BIG_ENDIAN
Definition: SDL_endian.h:38
SDL_CreateRGBSurfaceFrom
#define SDL_CreateRGBSurfaceFrom
Definition: SDL_dynapi_overrides.h:445
SDLTest_imageFace
static const SDLTest_SurfaceImage_t SDLTest_imageFace
Definition: SDL_test_imageFace.c:27
SDLTest_imageBlitBlendNone
static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendNone
Definition: SDL_test_imageBlitBlend.c:1564
SDLTest_imagePrimitives
static const SDLTest_SurfaceImage_t SDLTest_imagePrimitives
Definition: SDL_test_imagePrimitives.c:27
SDLTest_imagePrimitivesBlend
static const SDLTest_SurfaceImage_t SDLTest_imagePrimitivesBlend
Definition: SDL_test_imagePrimitivesBlend.c:27
SDLTest_imageBlitColor
static const SDLTest_SurfaceImage_t SDLTest_imageBlitColor
Definition: SDL_test_imageBlit.c:564
SDLTest_imageBlit
static const SDLTest_SurfaceImage_t SDLTest_imageBlit
Definition: SDL_test_imageBlit.c:27
SDL_BYTEORDER
#define SDL_BYTEORDER
Definition: SDL_config_pandora.h:37
SDLTest_imageBlitBlendMod
static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendMod
Definition: SDL_test_imageBlitBlend.c:1134