ReactOS 0.4.15-dev-7961-gdcf9eb0
surface.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * PURPOSE: GDI Driver Surace Functions
5 * FILE: win32ss/gdi/eng/surface.c
6 * PROGRAMERS: Jason Filby
7 * Timo Kreuzer
8 * TESTING TO BE DONE:
9 * - Create a GDI bitmap with all formats, perform all drawing operations on them, render to VGA surface
10 * refer to \test\microwin\src\engine\devdraw.c for info on correct pixel plotting for various formats
11 */
12
13#include <win32k.h>
14
15#define NDEBUG
16#include <debug.h>
17
19
22{
23 0, /* 0: unused */
24 1, /* 1: BMF_1BPP */
25 4, /* 2: BMF_4BPP */
26 8, /* 3: BMF_8BPP */
27 16, /* 4: BMF_16BPP */
28 24, /* 5: BMF_24BPP */
29 32, /* 6: BMF_32BPP */
30 4, /* 7: BMF_4RLE */
31 8, /* 8: BMF_8RLE */
32 0, /* 9: BMF_JPEG */
33 0, /* 10: BMF_PNG */
34};
35
36
39BitmapFormat(ULONG cBits, ULONG iCompression)
40{
41 switch (iCompression)
42 {
43 case BI_RGB:
44 /* Fall through */
45 case BI_BITFIELDS:
46 if (cBits <= 1) return BMF_1BPP;
47 if (cBits <= 4) return BMF_4BPP;
48 if (cBits <= 8) return BMF_8BPP;
49 if (cBits <= 16) return BMF_16BPP;
50 if (cBits <= 24) return BMF_24BPP;
51 if (cBits <= 32) return BMF_32BPP;
52 return 0;
53
54 case BI_RLE4:
55 return BMF_4RLE;
56
57 case BI_RLE8:
58 return BMF_8RLE;
59
60 default:
61 return 0;
62 }
63}
64
65VOID
68{
69 PSURFACE psurf = (PSURFACE)ObjectBody;
70 PVOID pvBits = psurf->SurfObj.pvBits;
71
72 /* Check if the surface has bits */
73 if (pvBits)
74 {
75 /* Only bitmaps can have bits */
77
78 /* Check if it is a DIB section */
79 if (psurf->hDIBSection)
80 {
81 /* Unmap the section view */
82 EngUnmapSectionView(pvBits, psurf->dwOffset, psurf->hSecure);
83 }
84 else if (psurf->SurfObj.fjBitmap & BMF_USERMEM)
85 {
86 /* Bitmap was allocated from usermode memory */
87 EngFreeUserMem(pvBits);
88 }
89 else if (psurf->SurfObj.fjBitmap & BMF_KMSECTION)
90 {
91 /* Bitmap was allocated from a kernel section */
92 if (!EngFreeSectionMem(NULL, pvBits))
93 {
94 DPRINT1("EngFreeSectionMem failed for %p!\n", pvBits);
95 // Should we BugCheck here?
97 }
98 }
99 else if (psurf->SurfObj.fjBitmap & BMF_POOLALLOC)
100 {
101 /* Free a pool allocation */
102 EngFreeMem(pvBits);
103 }
104 }
105
106 /* Free palette */
107 if(psurf->ppal)
108 {
110 }
111}
112
113
115NTAPI
118 _In_ ULONG cx,
119 _In_ ULONG cy,
121 _In_ ULONG fjBitmap,
122 _In_opt_ ULONG cjWidth,
123 _In_opt_ ULONG cjBufSize,
124 _In_opt_ PVOID pvBits)
125{
126 ULONG cBitsPixel, cjBits, cjObject;
127 PSURFACE psurf;
128 SURFOBJ *pso;
129 PVOID pvSection;
130
131 NT_ASSERT(!pvBits || (iType == STYPE_BITMAP));
132 NT_ASSERT((iFormat <= BMF_32BPP) || (cjBufSize != 0));
133 NT_ASSERT((LONG)cy > 0);
134
135 /* Verify format */
136 if ((iFormat < BMF_1BPP) || (iFormat > BMF_PNG))
137 {
138 DPRINT1("Invalid bitmap format: %lu\n", iFormat);
139 return NULL;
140 }
141
142 /* Get bits per pixel from the format */
143 cBitsPixel = gajBitsPerFormat[iFormat];
144
145 /* Are bits and a width in bytes given? */
146 if (pvBits && cjWidth)
147 {
148 /* Align the width (Windows compatibility, drivers expect that) */
149 cjWidth = WIDTH_BYTES_ALIGN32((cjWidth << 3) / cBitsPixel, cBitsPixel);
150 }
151 else
152 {
153 /* Calculate width from the bitmap width in pixels */
154 cjWidth = WIDTH_BYTES_ALIGN32(cx, cBitsPixel);
155 }
156
157 /* Is this an uncompressed format? */
158 if (iFormat <= BMF_32BPP)
159 {
160 /* Calculate the correct bitmap size in bytes */
161 if (!NT_SUCCESS(RtlULongMult(cjWidth, cy, &cjBits)))
162 {
163 DPRINT1("Overflow calculating size: cjWidth %lu, cy %lu\n",
164 cjWidth, cy);
165 return NULL;
166 }
167
168 /* Did we get a buffer and size? */
169 if ((pvBits != NULL) && (cjBufSize != 0))
170 {
171 /* Make sure the buffer is large enough */
172 if (cjBufSize < cjBits)
173 {
174 DPRINT1("Buffer is too small, required: %lu, got %lu\n",
175 cjBits, cjBufSize);
176 return NULL;
177 }
178 }
179 }
180 else
181 {
182 /* Compressed format, use the provided size */
183 NT_ASSERT(cjBufSize != 0);
184 cjBits = cjBufSize;
185 }
186
187 /* Check if we need an extra large object */
188 if ((iType == STYPE_BITMAP) && (pvBits == NULL) &&
189 !(fjBitmap & BMF_USERMEM) && !(fjBitmap & BMF_KMSECTION))
190 {
191 /* Allocate an object large enough to hold the bits */
192 cjObject = sizeof(SURFACE) + cjBits;
193 }
194 else
195 {
196 /* Otherwise just allocate the SURFACE structure */
197 cjObject = sizeof(SURFACE);
198 }
199
200 /* Check for arithmetic overflow */
201 if (cjObject < sizeof(SURFACE))
202 {
203 /* Fail! */
204 DPRINT1("Overflow calculating cjObject: cjBits %lu\n", cjBits);
205 return NULL;
206 }
207
208 /* Allocate a SURFACE object */
210 if (!psurf)
211 {
212 return NULL;
213 }
214
215 /* Initialize the basic fields */
216 pso = &psurf->SurfObj;
217 pso->hsurf = psurf->BaseObject.hHmgr;
218 pso->sizlBitmap.cx = cx;
219 pso->sizlBitmap.cy = cy;
220 pso->iBitmapFormat = iFormat;
221 pso->iType = iType;
222 pso->fjBitmap = (USHORT)fjBitmap;
224 pso->cjBits = cjBits;
225
226 /* Check if we need a bitmap buffer */
227 if (iType == STYPE_BITMAP)
228 {
229 /* Check if we got one or if we need to allocate one */
230 if (pvBits != NULL)
231 {
232 /* Use the caller provided buffer */
233 pso->pvBits = pvBits;
234 }
235 else if (fjBitmap & BMF_USERMEM)
236 {
237 /* User mode memory was requested */
238 pso->pvBits = EngAllocUserMem(cjBits, 0);
239
240 /* Check for failure */
241 if (!pso->pvBits)
242 {
244 return NULL;
245 }
246 }
247 else if (fjBitmap & BMF_KMSECTION)
248 {
249 /* Use a kernel mode section */
250 pso->pvBits = EngAllocSectionMem(&pvSection,
251 (fjBitmap & BMF_NOZEROINIT) ?
252 0 : FL_ZERO_MEMORY,
253 cjBits, TAG_DIB);
254
255 /* Check for failure */
256 if (!pso->pvBits)
257 {
259 return NULL;
260 }
261
262 /* Free the section already, but keep the mapping */
263 EngFreeSectionMem(pvSection, NULL);
264 }
265 else
266 {
267 /* Buffer is after the object */
268 pso->pvBits = psurf + 1;
269
270 /* Zero the buffer, except requested otherwise */
271 if (!(fjBitmap & BMF_NOZEROINIT))
272 {
273 RtlZeroMemory(pso->pvBits, cjBits);
274 }
275 }
276
277 /* Set pvScan0 and lDelta */
278 if (fjBitmap & BMF_TOPDOWN)
279 {
280 /* Topdown is the normal way */
281 pso->pvScan0 = pso->pvBits;
282 pso->lDelta = cjWidth;
283 }
284 else
285 {
286 /* Inversed bitmap (bottom up) */
287 pso->pvScan0 = ((PCHAR)pso->pvBits + pso->cjBits - cjWidth);
288 pso->lDelta = -(LONG)cjWidth;
289 }
290 }
291 else
292 {
293 /* There are no bitmap bits */
294 pso->pvScan0 = pso->pvBits = NULL;
295 pso->lDelta = 0;
296 }
297
298 /* Assign a default palette and increment its reference count */
300
301 return psurf;
302}
303
308 _In_ LONG lWidth,
310 _In_ ULONG fl,
311 _In_opt_ PVOID pvBits)
312{
313 PSURFACE psurf;
315
316 /* Allocate a surface */
318 sizl.cx,
319 sizl.cy,
320 iFormat,
321 fl,
322 lWidth,
323 0,
324 pvBits);
325 if (!psurf)
326 {
327 DPRINT1("SURFACE_AllocSurface failed. (STYPE_BITMAP, sizl.cx=%ld, sizl.cy=%ld, iFormat=%lu, fl=%lu, lWidth=%ld, pvBits=0x%p)\n",
328 sizl.cx, sizl.cy, iFormat, fl, lWidth, pvBits);
329 return NULL;
330 }
331
332 /* Get the handle for the bitmap */
333 hbmp = (HBITMAP)psurf->SurfObj.hsurf;
334
335 /* Mark as API bitmap */
336 psurf->flags = API_BITMAP;
337
338 /* Set public ownership */
340
341 /* Unlock the surface and return */
343 return hbmp;
344}
345
346/*
347 * @implemented
348 */
352 _In_ DHSURF dhsurf,
355{
356 PSURFACE psurf;
358
359 /* Allocate a surface */
361 sizl.cx,
362 sizl.cy,
363 iFormat,
364 0,
365 0,
366 0,
367 NULL);
368 if (!psurf)
369 {
370 DPRINT1("SURFACE_AllocSurface failed. (STYPE_DEVBITMAP, sizl.cx=%ld, sizl.cy=%ld, iFormat=%lu)\n",
371 sizl.cx, sizl.cy, iFormat);
372 return NULL;
373 }
374
375 /* Set the device handle */
376 psurf->SurfObj.dhsurf = dhsurf;
377
378 /* Set public ownership */
380
381 /* Get the handle for the bitmap */
382 hbmp = (HBITMAP)psurf->SurfObj.hsurf;
383
384 /* Unlock the surface and return */
386 return hbmp;
387}
388
389HSURF
392 _In_ DHSURF dhsurf,
395{
396 PSURFACE psurf;
397 HSURF hsurf;
398
399 /* Allocate a surface */
401 sizl.cx,
402 sizl.cy,
403 iFormat,
404 0,
405 0,
406 0,
407 NULL);
408 if (!psurf)
409 {
410 DPRINT1("SURFACE_AllocSurface failed. (STYPE_DEVICE, sizl.cx=%ld, sizl.cy=%ld, iFormat=%lu)\n",
411 sizl.cx, sizl.cy, iFormat);
412 return NULL;
413 }
414
415 /* Set the device handle */
416 psurf->SurfObj.dhsurf = dhsurf;
417
418 /* Set public ownership */
420
421 /* Get the handle for the surface */
422 hsurf = psurf->SurfObj.hsurf;
423
424 /* Unlock the surface and return */
426 return hsurf;
427}
428
429BOOL
432 _In_ HSURF hsurf,
433 _In_ HDEV hdev,
434 _In_ FLONG flHooks)
435{
436 SURFOBJ *pso;
437 PSURFACE psurf;
438 PDEVOBJ* ppdev;
439 PPALETTE ppal;
440
441 ppdev = (PDEVOBJ*)hdev;
442
443 /* Lock the surface */
444 psurf = SURFACE_ShareLockSurface(hsurf);
445 if (!psurf)
446 {
447 return FALSE;
448 }
449 pso = &psurf->SurfObj;
450
451 /* Associate the hdev */
452 pso->hdev = hdev;
453 pso->dhpdev = ppdev->dhpdev;
454
455 /* Hook up specified functions */
456 psurf->flags &= ~HOOK_FLAGS;
457 psurf->flags |= (flHooks & HOOK_FLAGS);
458
459 /* Assign the PDEV's palette */
461 SURFACE_vSetPalette(psurf, ppal);
463
465
466 return TRUE;
467}
468
469BOOL
472 _In_ HSURF hsurf,
473 _In_ HDEV hdev,
474 _In_ FLONG flHooks,
475 _In_ FLONG flSurface,
476 _In_ DHSURF dhsurf,
477 _In_ PVOID pvScan0,
478 _In_ LONG lDelta,
480{
481 SURFOBJ *pso;
482 PSURFACE psurf;
483 PDEVOBJ* ppdev;
484 PPALETTE ppal;
485
486 /* Lock the surface */
487 psurf = SURFACE_ShareLockSurface(hsurf);
488 if (psurf == NULL)
489 {
490 DPRINT1("Failed to reference surface %p\n", hsurf);
491 return FALSE;
492 }
493
494 ppdev = (PDEVOBJ*)hdev;
495 pso = &psurf->SurfObj;
496 pso->dhsurf = dhsurf;
497
498 /* Associate the hdev */
499 pso->hdev = hdev;
500 pso->dhpdev = ppdev->dhpdev;
501
502 /* Hook up specified functions */
503 psurf->flags &= ~HOOK_FLAGS;
504 psurf->flags |= (flHooks & HOOK_FLAGS);
505
506 /* Assign the PDEV's palette */
508 SURFACE_vSetPalette(psurf, ppal);
510
511 /* Update surface flags */
512 if (flSurface & MS_NOTSYSTEMMEMORY)
513 pso->fjBitmap |= BMF_NOTSYSMEM;
514 else
515 pso->fjBitmap &= ~BMF_NOTSYSMEM;
516 if (flSurface & MS_SHAREDACCESS)
517 psurf->flags |= SHAREACCESS_SURFACE;
518 else
519 psurf->flags &= ~SHAREACCESS_SURFACE;
520
521 /* Check if the caller passed bitmap bits */
522 if ((pvScan0 != NULL) && (lDelta != 0))
523 {
524 /* Update the fields */
525 pso->pvScan0 = pvScan0;
526 pso->lDelta = lDelta;
527
528 /* This is a bitmap now! */
529 pso->iType = STYPE_BITMAP;
530
531 /* Check memory layout */
532 if (lDelta > 0)
533 {
534 /* Topdown is the normal way */
535 pso->cjBits = lDelta * pso->sizlBitmap.cy;
536 pso->pvBits = pso->pvScan0;
537 pso->fjBitmap |= BMF_TOPDOWN;
538 }
539 else
540 {
541 /* Inversed bitmap (bottom up) */
542 pso->cjBits = (-lDelta) * pso->sizlBitmap.cy;
543 pso->pvBits = (PCHAR)pso->pvScan0 - pso->cjBits - lDelta;
544 pso->fjBitmap &= ~BMF_TOPDOWN;
545 }
546 }
547 else
548 {
549 /* Set bits to NULL */
550 pso->pvBits = NULL;
551 pso->pvScan0 = NULL;
552 pso->lDelta = 0;
553
554 /* Set appropriate surface type */
555 if (pso->iType != STYPE_DEVICE)
556 pso->iType = STYPE_DEVBITMAP;
557 }
558
560
561 return TRUE;
562}
563
564
565BOOL
569{
570 PSURFACE psurf;
571
572 psurf = SURFACE_ShareLockSurface(hsurf);
573 if (!psurf)
574 {
575 DPRINT1("Could not reference surface %p to delete\n", hsurf);
576 return FALSE;
577 }
578
580 return TRUE;
581}
582
583BOOL
587 _In_ RECTL *prcl,
589{
590 ASSERT(pso);
591 ASSERT(prcl);
592 return FillSolid(pso, prcl, iColor);
593}
594
595/*
596 * @implemented
597 */
600{
601 return EngLockSurface(hsurf);
602}
603
604
605SURFOBJ *
608 _In_ HSURF hsurf)
609{
610 SURFACE *psurf = SURFACE_ShareLockSurface(hsurf);
611
612 return psurf ? &psurf->SurfObj : NULL;
613}
614
620{
622 ASSERT(FALSE);
624}
625
626VOID
630{
631 if (pso != NULL)
632 {
633 SURFACE *psurf = CONTAINING_RECORD(pso, SURFACE, SurfObj);
635 }
636}
637
638/* EOF */
#define InterlockedIncrement
Definition: armddk.h:53
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define UNIMPLEMENTED
Definition: debug.h:115
HBITMAP hbmp
HGDIOBJ hHmgr(VOID)
Definition: baseobj.hpp:95
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define APIENTRY
Definition: api.h:79
#define BI_RLE4
Definition: precomp.h:57
#define BI_RGB
Definition: precomp.h:56
unsigned int BOOL
Definition: ntddk_ex.h:94
#define GDI_OBJECT_TYPE_BITMAP
Definition: gdi.h:48
#define STYPE_DEVICE
Definition: lmshare.h:24
#define PCHAR
Definition: match.c:90
#define BI_BITFIELDS
Definition: mmreg.h:507
#define ASSERT(a)
Definition: mode.c:44
static HBITMAP
Definition: button.c:44
static LPCSTR DWORD void * pvReserved
Definition: str.c:196
#define _Post_ptr_invalid_
Definition: ms_sal.h:698
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define _Reserved_
Definition: ms_sal.h:295
#define FASTCALL
Definition: nt_native.h:50
unsigned long FLONG
Definition: ntbasedef.h:366
#define GDI_OBJ_HMGR_PUBLIC
Definition: ntgdihdl.h:116
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
#define EngFreeMem
Definition: polytest.cpp:56
#define FL_ZERO_MEMORY
Definition: polytest.cpp:58
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
#define __kernel_entry
Definition: specstrings.h:355
HPALETTE hpalDefault
Definition: winddi.h:398
DHPDEV dhpdev
Definition: pdevobj.h:120
DEVINFO devinfo
Definition: pdevobj.h:122
SURFOBJ SurfObj
Definition: surface.h:8
HANDLE hDIBSection
Definition: surface.h:31
HANDLE hSecure
Definition: surface.h:32
DWORD dwOffset
Definition: surface.h:33
struct _PALETTE *const ppal
Definition: surface.h:11
BASEOBJECT BaseObject
Definition: surface.h:6
FLONG flags
Definition: surface.h:10
USHORT iType
Definition: winddi.h:1216
USHORT fjBitmap
Definition: winddi.h:1217
PVOID pvBits
Definition: winddi.h:1211
DHSURF dhsurf
Definition: winddi.h:1205
HDEV hdev
Definition: winddi.h:1208
HSURF hsurf
Definition: winddi.h:1206
#define WIDTH_BYTES_ALIGN32(cx, bpp)
Definition: swimpl.c:16
#define NTAPI
Definition: typedefs.h:36
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define IN
Definition: typedefs.h:39
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
VOID NTAPI EngUnmapSectionView(_In_ PVOID pvBits, _In_ ULONG cjOffset, _In_ HANDLE hSecure)
Definition: mapping.c:71
BOOL APIENTRY EngFreeSectionMem(_In_opt_ PVOID pvSection, _In_opt_ PVOID pvMappedBase)
Definition: mapping.c:246
BOOL APIENTRY FillSolid(SURFOBJ *pso, PRECTL pRect, ULONG iColor)
Definition: paint.c:35
VOID APIENTRY EngUnlockSurface(_In_ _Post_ptr_invalid_ SURFOBJ *pso)
Definition: surface.c:628
UCHAR gajBitsPerFormat[11]
Definition: surface.c:21
BOOL APIENTRY EngEraseSurface(_In_ SURFOBJ *pso, _In_ RECTL *prcl, _In_ ULONG iColor)
Definition: surface.c:585
SURFOBJ *APIENTRY NtGdiEngLockSurface(IN HSURF hsurf)
Definition: surface.c:599
LONG giUniqueSurface
Definition: surface.c:18
ULONG FASTCALL BitmapFormat(ULONG cBits, ULONG iCompression)
Definition: surface.c:39
HBITMAP APIENTRY EngCreateDeviceBitmap(_In_ DHSURF dhsurf, _In_ SIZEL sizl, _In_ ULONG iFormat)
Definition: surface.c:351
PSURFACE NTAPI SURFACE_AllocSurface(_In_ USHORT iType, _In_ ULONG cx, _In_ ULONG cy, _In_ ULONG iFormat, _In_ ULONG fjBitmap, _In_opt_ ULONG cjWidth, _In_opt_ ULONG cjBufSize, _In_opt_ PVOID pvBits)
Definition: surface.c:116
HSURF APIENTRY EngCreateDeviceSurface(_In_ DHSURF dhsurf, _In_ SIZEL sizl, _In_ ULONG iFormat)
Definition: surface.c:391
__kernel_entry NTSTATUS APIENTRY NtGdiEngUnlockSurface(_In_ SURFOBJ *pso)
Definition: surface.c:618
BOOL APIENTRY EngModifySurface(_In_ HSURF hsurf, _In_ HDEV hdev, _In_ FLONG flHooks, _In_ FLONG flSurface, _In_ DHSURF dhsurf, _In_ PVOID pvScan0, _In_ LONG lDelta, _Reserved_ PVOID pvReserved)
Definition: surface.c:471
VOID NTAPI SURFACE_vCleanup(PVOID ObjectBody)
Definition: surface.c:67
SURFOBJ *APIENTRY EngLockSurface(_In_ HSURF hsurf)
Definition: surface.c:607
#define SURFACE_ShareUnlockSurface(pBMObj)
Definition: surface.h:102
struct _SURFACE SURFACE
FORCEINLINE VOID SURFACE_vSetPalette(_Inout_ PSURFACE psurf, _In_ PPALETTE ppal)
Definition: surface.h:136
@ API_BITMAP
Definition: surface.h:76
@ SHAREACCESS_SURFACE
Definition: surface.h:52
struct _SURFACE * PSURFACE
#define BMF_POOLALLOC
Definition: surface.h:84
#define SURFACE_ShareLockSurface(hBMObj)
Definition: surface.h:91
#define SURFACE_UnlockSurface(pBMObj)
Definition: surface.h:100
VOID NTAPI GDIOBJ_vSetObjectOwner(POBJ pobj, ULONG ulNewOwner)
Definition: gdiobj.c:965
POBJ NTAPI GDIOBJ_AllocObjWithHandle(ULONG ObjectType, ULONG cjSize)
Definition: gdiobj.c:1522
VOID NTAPI GDIOBJ_vDeleteObject(POBJ pobj)
Definition: gdiobj.c:1111
PPALETTE appalSurfaceDefault[11]
Definition: palette.c:21
#define PALETTE_ShareLockPalette(hpal)
Definition: palette.h:57
#define PALETTE_ShareUnlockPalette(ppal)
Definition: palette.h:59
#define TAG_DIB
Definition: tags.h:17
#define BMF_16BPP
Definition: winddi.h:358
#define BMF_8BPP
Definition: winddi.h:357
#define STYPE_BITMAP
Definition: winddi.h:1175
ENGAPI BOOL APIENTRY EngDeleteSurface(_In_ _Post_ptr_invalid_ HSURF hsurf)
Definition: surface.c:567
_In_ HANDLE _In_ SURFOBJ * pso
Definition: winddi.h:3665
_In_ FLONG fl
Definition: winddi.h:1279
#define BMF_1BPP
Definition: winddi.h:355
ENGAPI HBITMAP APIENTRY EngCreateBitmap(_In_ SIZEL sizl, _In_ LONG lWidth, _In_ ULONG iFormat, _In_ FLONG fl, _In_opt_ PVOID pvBits)
_In_ HDEV hdev
Definition: winddi.h:3449
#define BMF_PNG
Definition: winddi.h:364
#define MS_NOTSYSTEMMEMORY
Definition: winddi.h:2129
ENGAPI VOID APIENTRY EngFreeUserMem(_Pre_notnull_ __drv_freesMem(UserMem) PVOID pv)
#define HOOK_FLAGS
Definition: winddi.h:1438
#define MS_SHAREDACCESS
Definition: winddi.h:2130
#define BMF_24BPP
Definition: winddi.h:359
#define BMF_TOPDOWN
Definition: winddi.h:1180
#define BMF_32BPP
Definition: winddi.h:360
#define BMF_USERMEM
Definition: winddi.h:1183
ENGAPI BOOL APIENTRY EngAssociateSurface(_In_ HSURF hsurf, _In_ HDEV hdev, _In_ FLONG flHooks)
Definition: surface.c:431
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
#define BMF_NOTSYSMEM
Definition: winddi.h:1185
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl
Definition: winddi.h:3531
_In_ ULONG iType
Definition: winddi.h:3748
#define BMF_NOZEROINIT
Definition: winddi.h:1181
#define BMF_KMSECTION
Definition: winddi.h:1184
#define STYPE_DEVBITMAP
Definition: winddi.h:1177
#define BMF_8RLE
Definition: winddi.h:362
#define BMF_4RLE
Definition: winddi.h:361
_In_ SIZEL _In_ ULONG iFormat
Definition: winddi.h:3468
#define BMF_4BPP
Definition: winddi.h:356
_In_ SIZEL sizl
Definition: winddi.h:3467
#define BI_RLE8
Definition: wingdi.h:35
#define NT_ASSERT
Definition: rtlfuncs.h:3310
_In_ ULONG iColor
Definition: xlateobj.h:17
unsigned char UCHAR
Definition: xmlstorage.h:181