ReactOS 0.4.15-dev-7918-g2a2556c
sw_pixelformat.c File Reference
#include <windows.h>
#include <wingdi.h>
#include <GL/gl.h>
#include <stdio.h>
#include "wine/test.h"
Include dependency graph for sw_pixelformat.c:

Go to the source code of this file.

Classes

struct  test_color
 

Macros

#define FLAGS_TO_STR(__x__)
 
#define TEST_FIELD(__x__)   ok(pfd.__x__ == colors->__x__, "Wrong " #__x__ " for format %i, expected %u, got %u\n", pf, colors->__x__, pfd.__x__)
 
#define TEST_FIELD(__x__, __y__)   ok(pfd.__x__ == __y__, "Wrong " #__x__ " for format %i, expected " #__y__ ", got %u\n", pf, (UINT)pfd.__x__)
 

Functions

static charstr_dbg_pfd_flags (DWORD flags)
 
static void test_format (HDC hdc, int num_pf, int pf, const struct test_color *colors, BYTE depth, BOOL is_window, BOOL is_double_buffered)
 
static void test_screen_colors (const struct test_color **colors)
 
static HBITMAP create_dib_section (WORD bpp, void **dstBuffer)
 
static void test_bitmap_colors (HDC hdc, const struct test_color **colors)
 
static void test_bitmap_formats (const struct test_color **colors)
 
 START_TEST (sw_pixelformat)
 

Variables

static const struct test_color test_colors_32 []
 
static const struct test_color test_colors_24 []
 
static const struct test_color test_colors_16 []
 
static const struct test_color test_colors_16_565 []
 
static const struct test_color test_colors_8 []
 
static const struct test_color test_colors_4 []
 
static const struct test_colortest_colors_32bpp [] = {test_colors_32, test_colors_24, test_colors_16, test_colors_8, test_colors_4, NULL}
 
static const struct test_colortest_colors_24bpp [] = {test_colors_24, test_colors_32, test_colors_16, test_colors_8, test_colors_4, NULL}
 
static const struct test_colortest_colors_16bpp [] = {test_colors_16_565, test_colors_24, test_colors_32, test_colors_8, test_colors_4, NULL}
 
static const struct test_colortest_colors_8bpp [] = {test_colors_8, test_colors_24, test_colors_32, test_colors_16, test_colors_4, NULL}
 
static const BYTE test_depths [] = { 32, 16 }
 

Macro Definition Documentation

◆ FLAGS_TO_STR

#define FLAGS_TO_STR (   __x__)
Value:
do { \
if (flags & __x__) \
{ \
if (!first) strcat(p, " | "); \
strcat(p, #__x__); \
first = FALSE; \
flags &= ~((DWORD)__x__); \
} \
} while(0)
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
#define FALSE
Definition: types.h:117
GLbitfield flags
Definition: glext.h:7161
const GLint * first
Definition: glext.h:5794
GLfloat GLfloat p
Definition: glext.h:8902
#define DWORD
Definition: nt_native.h:44

◆ TEST_FIELD [1/2]

#define TEST_FIELD (   __x__)    ok(pfd.__x__ == colors->__x__, "Wrong " #__x__ " for format %i, expected %u, got %u\n", pf, colors->__x__, pfd.__x__)

◆ TEST_FIELD [2/2]

#define TEST_FIELD (   __x__,
  __y__ 
)    ok(pfd.__x__ == __y__, "Wrong " #__x__ " for format %i, expected " #__y__ ", got %u\n", pf, (UINT)pfd.__x__)

Function Documentation

◆ create_dib_section()

static HBITMAP create_dib_section ( WORD  bpp,
void **  dstBuffer 
)
static

Definition at line 266 of file sw_pixelformat.c.

267{
268 BITMAPINFO bi;
269
270 memset(&bi, 0, sizeof(BITMAPINFO));
271 bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
272 bi.bmiHeader.biWidth = 4;
273 bi.bmiHeader.biHeight = -4;
274 bi.bmiHeader.biPlanes = 1;
277
278 return CreateDIBSection(0, &bi, DIB_RGB_COLORS, dstBuffer, NULL, 0);
279}
#define NULL
Definition: types.h:112
DWORD bpp
Definition: surface.c:185
#define BI_RGB
Definition: precomp.h:56
#define memset(x, y, z)
Definition: compat.h:39
USHORT biBitCount
Definition: precomp.h:46
ULONG biCompression
Definition: precomp.h:47
BITMAPINFOHEADER bmiHeader
Definition: wingdi.h:1476
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
Definition: bitmap.c:245
#define DIB_RGB_COLORS
Definition: wingdi.h:367

Referenced by test_bitmap_formats().

◆ START_TEST()

START_TEST ( sw_pixelformat  )

Definition at line 364 of file sw_pixelformat.c.

365{
367 INT ret;
368 DWORD orig_bpp;
369 static const WORD bit_depths[] = {8, 16, 24, 32};
371 INT i;
372
374 ok (ret != 0, "EnumDisplaySettings failed.\n");
375 orig_bpp = devMode.dmBitsPerPel;
376
377 for (i = 0; i < ARRAY_SIZE(bit_depths); i++)
378 {
379 devMode.dmBitsPerPel = bit_depths[i];
382 {
383 trace("Testing %ubpp\n", bit_depths[i]);
384 test_screen_colors(colors[i]);
385 test_bitmap_formats(colors[i]);
386 }
387 else
388 {
389 skip("Unable to switch to %ubpp\n", bit_depths[i]);
390 }
391 }
392
393 devMode.dmBitsPerPel = orig_bpp;
395}
#define trace
Definition: atltest.h:70
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define ARRAY_SIZE(A)
Definition: main.h:33
static HGLOBAL devMode
Definition: print.c:52
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static const struct test_color * test_colors_8bpp[]
static const struct test_color * test_colors_32bpp[]
static void test_screen_colors(const struct test_color **colors)
static void test_bitmap_formats(const struct test_color **colors)
static const struct test_color * test_colors_16bpp[]
static const struct test_color * test_colors_24bpp[]
int32_t INT
Definition: typedefs.h:58
int ret
LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR lpszDeviceName, LPDEVMODEW lpDevMode, HWND hwnd, DWORD dwflags, LPVOID lParam)
Definition: display.c:585
BOOL WINAPI EnumDisplaySettingsW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode)
Definition: display.c:408
#define DISP_CHANGE_SUCCESSFUL
Definition: winuser.h:190
#define ENUM_CURRENT_SETTINGS
Definition: winuser.h:179

◆ str_dbg_pfd_flags()

static char * str_dbg_pfd_flags ( DWORD  flags)
static

Definition at line 15 of file sw_pixelformat.c.

16{
17 static char buffer[1000];
18 static char *p = buffer;
19 char* ret;
20
21 BOOL first = TRUE;
22
23 if (p > &buffer[800])
24 p = buffer;
25
26 *p = 0;
27
28#define FLAGS_TO_STR(__x__) \
29 do { \
30 if (flags & __x__) \
31 { \
32 if (!first) strcat(p, " | "); \
33 strcat(p, #__x__); \
34 first = FALSE; \
35 flags &= ~((DWORD)__x__); \
36 } \
37 } while(0)
38
53#undef FLAGS_TO_STR
54
55 if (flags)
56 {
57 char tmp[16];
58 sprintf(tmp, " | 0x%08x", (UINT)flags);
59 strcat(p, tmp);
60 }
61
62 ret = p;
63
64 p += strlen(p) + 1;
65
66 return ret;
67}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define TRUE
Definition: types.h:120
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint buffer
Definition: glext.h:5915
#define sprintf(buf, format,...)
Definition: sprintf.c:55
unsigned int UINT
Definition: ndis.h:50
#define FLAGS_TO_STR(__x__)
#define PFD_NEED_SYSTEM_PALETTE
Definition: wingdi.h:309
#define PFD_SWAP_COPY
Definition: wingdi.h:311
#define PFD_SUPPORT_COMPOSITION
Definition: wingdi.h:314
#define PFD_SWAP_LAYER_BUFFERS
Definition: wingdi.h:312
#define PFD_SUPPORT_OPENGL
Definition: wingdi.h:306
#define PFD_SUPPORT_GDI
Definition: wingdi.h:305
#define PFD_STEREO
Definition: wingdi.h:302
#define PFD_DRAW_TO_BITMAP
Definition: wingdi.h:304
#define PFD_GENERIC_FORMAT
Definition: wingdi.h:307
#define PFD_SWAP_EXCHANGE
Definition: wingdi.h:310
#define PFD_DRAW_TO_WINDOW
Definition: wingdi.h:303
#define PFD_GENERIC_ACCELERATED
Definition: wingdi.h:313
#define PFD_DOUBLEBUFFER
Definition: wingdi.h:301
#define PFD_NEED_PALETTE
Definition: wingdi.h:308

Referenced by test_format().

◆ test_bitmap_colors()

static void test_bitmap_colors ( HDC  hdc,
const struct test_color **  colors 
)
static

Definition at line 281 of file sw_pixelformat.c.

282{
283 INT num_pf, pf, ret;
285 INT i, j;
286
287 num_pf = DescribePixelFormat(hdc, 0, 0, NULL);
288 ok(num_pf > 0, "DescribePixelFormat failed.\n");
289
290 for (pf = 1; pf <= num_pf; pf++)
291 {
292 ret = DescribePixelFormat(hdc, pf, sizeof(pfd), &pfd);
293 ok(ret == num_pf, "Number of pixel formats changed!\n");
294
296 break;
297 }
298
299 ok(pf < num_pf, "No generic pixel format!\n");
300
301 /* First the formats compatible with the DC */
302 for (i = 0; i < 3; i++)
303 {
304 /* Single buffered first */
305 for (j = 0; j < ARRAY_SIZE(test_depths); j++)
306 {
307 test_format(hdc, num_pf, pf++, &colors[0][i], test_depths[j], TRUE, FALSE);
308 }
309
310 /* Then double buffered */
311 for (j = 0; j < ARRAY_SIZE(test_depths); j++)
312 {
313 test_format(hdc, num_pf, pf++, &colors[0][i], test_depths[j], TRUE, TRUE);
314 }
315 }
316
317 colors++;
318
319 /* Then the rest */
320 while (*colors)
321 {
322 for (i = 0; i < 3; i++)
323 {
324 for (j = 0; j < ARRAY_SIZE(test_depths); j++)
325 {
326 test_format(hdc, num_pf, pf++, &colors[0][i], test_depths[j], FALSE, FALSE);
327 }
328 }
329 colors++;
330 }
331
332 /* We must have tested all generic formats. */
333 ok(pf - 1 == num_pf, "We didn't test all generic formats : tested %u, total %u.\n", pf, num_pf);
334}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
HDC hdc
Definition: main.c:9
static PIXELFORMATDESCRIPTOR pfd
Definition: ssstars.c:67
static void test_format(HDC hdc, int num_pf, int pf, const struct test_color *colors, BYTE depth, BOOL is_window, BOOL is_double_buffered)
static const BYTE test_depths[]
int WINAPI DescribePixelFormat(_In_ HDC hdc, _In_ int iPixelFormat, _In_ UINT nBytes, _Out_writes_bytes_opt_(nBytes) LPPIXELFORMATDESCRIPTOR ppfd)

Referenced by test_bitmap_formats().

◆ test_bitmap_formats()

static void test_bitmap_formats ( const struct test_color **  colors)
static

Definition at line 336 of file sw_pixelformat.c.

337{
338 HBITMAP oldBmp, dib;
339 HDC hdc;
340 static const INT bpps [] = {4, 8, 16, 24, 32};
341 INT i;
342 void* dib_buffer;
343
345 ok (hdc != NULL, "Failed creating a memory DC.\n");
346
347 for (i = 0; i < ARRAY_SIZE(bpps); i++)
348 {
349 dib = create_dib_section(bpps[i], &dib_buffer);
350 ok(dib != NULL, "Failed to create DIB for %u bpp\n", bpps[i]);
351
352 oldBmp = SelectObject(hdc, dib);
353 ok (oldBmp != NULL, "Failed to select the DIB\n");
354
355 trace("testing DIB %ubpp\n", bpps[i]);
356 /* For mem DC, this is always the depth of the screen which is taken into account */
357 test_bitmap_colors(hdc, colors);
358
359 SelectObject(hdc, oldBmp);
361 }
362}
pKey DeleteObject()
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:92
static const BYTE dib[]
Definition: ole2.c:201
static HBITMAP create_dib_section(WORD bpp, void **dstBuffer)
static void test_bitmap_colors(HDC hdc, const struct test_color **colors)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)

Referenced by START_TEST().

◆ test_format()

static void test_format ( HDC  hdc,
int  num_pf,
int  pf,
const struct test_color colors,
BYTE  depth,
BOOL  is_window,
BOOL  is_double_buffered 
)
static

Definition at line 130 of file sw_pixelformat.c.

131{
133 int ret;
134
135 ret = DescribePixelFormat(hdc, pf, sizeof(pfd), &pfd);
136 ok(ret == num_pf, "Number of pixel formats changed!\n");
137
138 ok(pfd.nSize == sizeof(pfd), "Wrong nSize for format %i, expected %u, got %u\n", pf, (WORD)sizeof(pfd), pfd.nSize);
139 ok(pfd.nVersion == 1, "Wrong nVersion for format %i, expected 1, got %u\n", pf, pfd.nVersion);
140 if (is_window)
141 {
143
144 if ((pfd.cColorBits <= 8) && (pfd.iPixelType == PFD_TYPE_RGBA))
146
147 if (is_double_buffered)
148 {
150 }
151 else
152 {
154 }
156 "Wrong dwFlags for format %i, expected %s (0x%08x), got %s(0x%08x)\n",
158 }
159 else
160 {
162 "Wrong dwFlags for format %i, expected PFD_DRAW_TO_BITMAP | PFD_SUPPORT_GDI | PFD_SUPPORT_OPENGL | PFD_GENERIC_FORMAT, got %s\n",
164 }
165
166#define TEST_FIELD(__x__) ok(pfd.__x__ == colors->__x__, "Wrong " #__x__ " for format %i, expected %u, got %u\n", pf, colors->__x__, pfd.__x__)
167 TEST_FIELD(iPixelType);
168 TEST_FIELD(cColorBits);
169 TEST_FIELD(cRedBits);
170 TEST_FIELD(cRedShift);
171 TEST_FIELD(cGreenBits);
172 TEST_FIELD(cGreenShift);
173 TEST_FIELD(cBlueBits);
174 TEST_FIELD(cBlueShift);
175 TEST_FIELD(cAlphaBits);
176 TEST_FIELD(cAlphaShift);
177 TEST_FIELD(cAccumBits);
178 TEST_FIELD(cAccumRedBits);
179 TEST_FIELD(cAccumGreenBits);
180 TEST_FIELD(cAccumBlueBits);
181 TEST_FIELD(cAccumAlphaBits);
182#undef TEST_FIELD
183 ok(pfd.cDepthBits == depth, "Wrong cDepthBit for format %i, expected %u, got %u\n", pf, depth, pfd.cDepthBits);
184
185 /* the rest is constant */
186#define TEST_FIELD(__x__, __y__) ok(pfd.__x__ == __y__, "Wrong " #__x__ " for format %i, expected " #__y__ ", got %u\n", pf, (UINT)pfd.__x__)
187 TEST_FIELD(cStencilBits, 8);
188 TEST_FIELD(cAuxBuffers, 0);
189 TEST_FIELD(iLayerType, 0);
190 TEST_FIELD(bReserved, 0);
191 TEST_FIELD(dwLayerMask, 0);
192 TEST_FIELD(dwVisibleMask, 0);
193 TEST_FIELD(dwDamageMask, 0);
194#undef TEST_FIELD
195}
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546
static char * str_dbg_pfd_flags(DWORD flags)
#define TEST_FIELD(__x__)
#define PFD_TYPE_RGBA
Definition: wingdi.h:296

Referenced by test_bitmap_colors(), and test_screen_colors().

◆ test_screen_colors()

static void test_screen_colors ( const struct test_color **  colors)
static

Definition at line 197 of file sw_pixelformat.c.

198{
199 int pf, num_pf, ret;
200 int i, j;
201 HDC hdc;
202 HWND hwnd;
204
205 hwnd = CreateWindowA("static", "Title", WS_OVERLAPPEDWINDOW, 10, 10, 200, 200, NULL, NULL,
206 NULL, NULL);
207 if (!hwnd)
208 {
209 ok(hwnd != NULL, "Failed to create a window.\n");
210 return;
211 }
212
213 hdc = GetDC( hwnd );
214 num_pf = DescribePixelFormat(hdc, 0, 0, NULL);
215 ok(num_pf > 0, "DescribePixelFormat failed.\n");
216
217 for (pf = 1; pf <= num_pf; pf++)
218 {
219 ret = DescribePixelFormat(hdc, pf, sizeof(pfd), &pfd);
220 ok(ret == num_pf, "Number of pixel formats changed!\n");
221
223 break;
224 }
225
226 ok(pf < num_pf, "No generic pixel format!\n");
227
228 /* First the formats compatible with the DC */
229 for (i = 0; i < 3; i++)
230 {
231 /* Single buffered first */
232 for (j = 0; j < ARRAY_SIZE(test_depths); j++)
233 {
234 test_format(hdc, num_pf, pf++, &colors[0][i], test_depths[j], TRUE, FALSE);
235 }
236
237 /* Then double buffered */
238 for (j = 0; j < ARRAY_SIZE(test_depths); j++)
239 {
240 test_format(hdc, num_pf, pf++, &colors[0][i], test_depths[j], TRUE, TRUE);
241 }
242 }
243
244 colors++;
245
246 /* Then the rest */
247 while (*colors)
248 {
249 for (i = 0; i < 3; i++)
250 {
251 for (j = 0; j < ARRAY_SIZE(test_depths); j++)
252 {
253 test_format(hdc, num_pf, pf++, &colors[0][i], test_depths[j], FALSE, FALSE);
254 }
255 }
256 colors++;
257 }
258
259 /* We must have tested all generic formats. */
260 ok(pf - 1 == num_pf, "We didn't test all generic formats : tested %u, total %u.\n", pf, num_pf);
261
262 ReleaseDC( hwnd, hdc );
264}
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4315
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)

Referenced by START_TEST().

Variable Documentation

◆ test_colors_16

const struct test_color test_colors_16[]
static
Initial value:
=
{
{PFD_TYPE_RGBA, 16, 5, 10, 5, 5, 5, 0, 0, 0, 32, 11, 11, 10, 0},
{PFD_TYPE_RGBA, 16, 5, 10, 5, 5, 5, 0, 8, 0, 32, 8, 8, 8, 8},
{PFD_TYPE_COLORINDEX, 16, 5, 10, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0},
}
#define PFD_TYPE_COLORINDEX
Definition: wingdi.h:297

Definition at line 95 of file sw_pixelformat.c.

◆ test_colors_16_565

const struct test_color test_colors_16_565[]
static
Initial value:
=
{
{PFD_TYPE_RGBA, 16, 5, 11, 6, 5, 5, 0, 0, 0, 32, 11, 11, 10, 0},
{PFD_TYPE_RGBA, 16, 5, 11, 6, 5, 5, 0, 8, 0, 32, 8, 8, 8, 8},
{PFD_TYPE_COLORINDEX, 16, 5, 11, 6, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0},
}

Definition at line 102 of file sw_pixelformat.c.

◆ test_colors_16bpp

Definition at line 125 of file sw_pixelformat.c.

Referenced by START_TEST().

◆ test_colors_24

const struct test_color test_colors_24[]
static
Initial value:
=
{
{PFD_TYPE_RGBA, 24, 8, 16, 8, 8, 8, 0, 0, 0, 64, 16, 16, 16, 0},
{PFD_TYPE_RGBA, 24, 8, 16, 8, 8, 8, 0, 8, 0, 64, 16, 16, 16, 16},
{PFD_TYPE_COLORINDEX, 24, 8, 16, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0},
}

Definition at line 88 of file sw_pixelformat.c.

◆ test_colors_24bpp

Definition at line 124 of file sw_pixelformat.c.

Referenced by START_TEST().

◆ test_colors_32

const struct test_color test_colors_32[]
static
Initial value:
=
{
{PFD_TYPE_RGBA, 32, 8, 16, 8, 8, 8, 0, 0, 0, 64, 16, 16, 16, 0},
{PFD_TYPE_RGBA, 32, 8, 16, 8, 8, 8, 0, 8, 0, 64, 16, 16, 16, 16},
{PFD_TYPE_COLORINDEX, 32, 8, 16, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0},
}

Definition at line 81 of file sw_pixelformat.c.

◆ test_colors_32bpp

Definition at line 123 of file sw_pixelformat.c.

Referenced by START_TEST().

◆ test_colors_4

const struct test_color test_colors_4[]
static
Initial value:
=
{
{PFD_TYPE_RGBA, 4, 1, 0, 1, 1, 1, 2, 0, 0, 16, 5, 6, 5, 0},
{PFD_TYPE_RGBA, 4, 1, 0, 1, 1, 1, 2, 8, 0, 16, 4, 4, 4, 4},
{PFD_TYPE_COLORINDEX, 4, 1, 0, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0},
}

Definition at line 116 of file sw_pixelformat.c.

◆ test_colors_8

const struct test_color test_colors_8[]
static
Initial value:
=
{
{PFD_TYPE_RGBA, 8, 3, 0, 3, 3, 2, 6, 0, 0, 32, 11, 11, 10, 0},
{PFD_TYPE_RGBA, 8, 3, 0, 3, 3, 2, 6, 8, 0, 32, 8, 8, 8, 8},
{PFD_TYPE_COLORINDEX, 8, 3, 0, 3, 3, 2, 6, 0, 0, 0, 0, 0, 0, 0},
}

Definition at line 109 of file sw_pixelformat.c.

◆ test_colors_8bpp

Definition at line 126 of file sw_pixelformat.c.

Referenced by START_TEST().

◆ test_depths

const BYTE test_depths[] = { 32, 16 }
static

Definition at line 128 of file sw_pixelformat.c.

Referenced by test_bitmap_colors(), and test_screen_colors().