ReactOS  0.4.14-dev-293-g2b39b42
eng.c File Reference
#include <win32k.h>
#include <debug.h>
Include dependency graph for eng.c:

Go to the source code of this file.

Functions

FLATPTR APIENTRY HeapVidMemAllocAligned (LPVIDMEM lpVidMem, DWORD dwWidth, DWORD dwHeight, LPSURFACEALIGNMENT lpAlignment, LPLONG lpNewPitch)
 
VOID APIENTRY VidMemFree (LPVMEMHEAP pvmh, FLATPTR ptr)
 
_Must_inspect_result_ _Ret_opt_bytecount_ (cjMemSize)
 
VOID APIENTRY EngFreePrivateUserMem (PDD_SURFACE_LOCAL psl, PVOID pv)
 
HRESULT APIENTRY EngDxIoctl (ULONG ulIoctl, PVOID pBuffer, ULONG ulBufferSize)
 
PDD_SURFACE_LOCAL APIENTRY EngLockDirectDrawSurface (HANDLE hSurface)
 
BOOL APIENTRY EngUnlockDirectDrawSurface (PDD_SURFACE_LOCAL pSurface)
 

Function Documentation

◆ _Ret_opt_bytecount_()

_Must_inspect_result_ _Ret_opt_bytecount_ ( cjMemSize  )

Definition at line 63 of file eng.c.

72 {
74 
75  if (pfnEngAllocPrivateUserMem == NULL)
76  {
77  DPRINT1("Warning: no pfnEngAllocPrivateUserMem\n");
79  }
80 
81  DPRINT1("Calling dxg.sys pfnEngAllocPrivateUserMem\n");
82  return pfnEngAllocPrivateUserMem(psl, cjMemSize, ulTag);
83 }
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
_Must_inspect_result_ _In_ ULONG cjMemSize
Definition: winddi.h:1381
PVOID(APIENTRY * PGD_ENGALLOCPRIVATEUSERMEM)(PDD_SURFACE_LOCAL, SIZE_T, ULONG)
Definition: intddraw.h:106
smooth NULL
Definition: ftsmooth.c:416
#define DXG_INDEX_DxDdAllocPrivateUserMem
Definition: dxg.h:96
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
_In_ ULONG _In_ ULONG ulTag
Definition: winddi.h:3941
#define DPRINT1
Definition: precomp.h:8

◆ EngDxIoctl()

HRESULT APIENTRY EngDxIoctl ( ULONG  ulIoctl,
PVOID  pBuffer,
ULONG  ulBufferSize 
)

Definition at line 132 of file eng.c.

135 {
137  DWORD retVal = DDERR_UNSUPPORTED;
138 
139  DPRINT1("Calling dxg.sys pfnEngDxIoctl\n");
140 
141  if (pfnEngDxIoctl != NULL)
142  {
143  retVal = pfnEngDxIoctl(ulIoctl, pBuffer, ulBufferSize);
144  }
145 
146  return retVal;
147 }
#define DDERR_UNSUPPORTED
Definition: ddraw.h:127
smooth NULL
Definition: ftsmooth.c:416
PVOID pBuffer
unsigned long DWORD
Definition: ntddk_ex.h:95
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DXG_INDEX_DxDdIoctl
Definition: dxg.h:100
#define DPRINT1
Definition: precomp.h:8
DWORD(NTAPI * PGD_ENGDXIOCTL)(ULONG, PVOID, ULONG)
Definition: dxg.h:214

◆ EngFreePrivateUserMem()

VOID APIENTRY EngFreePrivateUserMem ( PDD_SURFACE_LOCAL  psl,
PVOID  pv 
)

Definition at line 90 of file eng.c.

92 {
94 
95  if (pfnEngFreePrivateUserMem == NULL)
96  {
97  DPRINT1("Warning: no pfnEngFreePrivateUserMem\n");
98  }
99  else
100  {
101  DPRINT1("Calling dxg.sys pfnEngFreePrivateUserMem\n");
102  pfnEngFreePrivateUserMem(psl, pv);
103  }
104 }
VOID(APIENTRY * PGD_ENGFREEPRIVATEUSERMEM)(PDD_SURFACE_LOCAL, PVOID)
Definition: intddraw.h:107
smooth NULL
Definition: ftsmooth.c:416
#define DXG_INDEX_DxDdFreePrivateUserMem
Definition: dxg.h:97
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8

◆ EngLockDirectDrawSurface()

PDD_SURFACE_LOCAL APIENTRY EngLockDirectDrawSurface ( HANDLE  hSurface)

Definition at line 167 of file eng.c.

168 {
170  PDD_SURFACE_LOCAL retVal = NULL;
171 
172  DPRINT1("Calling dxg.sys pfnEngLockDirectDrawSurface\n");
173 
174  if (pfnEngLockDirectDrawSurface != NULL)
175  {
176  retVal = pfnEngLockDirectDrawSurface(hSurface);
177  }
178 
179  return retVal;
180 }
smooth NULL
Definition: ftsmooth.c:416
#define DXG_INDEX_DxDdLockDirectDrawSurface
Definition: dxg.h:98
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
PDD_SURFACE_LOCAL(APIENTRY * PGD_ENGLOCKDIRECTDRAWSURFACE)(HANDLE)
Definition: intddraw.h:108
#define DPRINT1
Definition: precomp.h:8

◆ EngUnlockDirectDrawSurface()

BOOL APIENTRY EngUnlockDirectDrawSurface ( PDD_SURFACE_LOCAL  pSurface)

Definition at line 201 of file eng.c.

202 {
204  BOOL retVal = FALSE;
205 
206  DPRINT1("Calling dxg.sys pfnEngUnlockDirectDrawSurface\n");
207 
208  if (pfnEngUnlockDirectDrawSurface != NULL)
209  {
210  retVal = pfnEngUnlockDirectDrawSurface(pSurface);
211  }
212 
213  return retVal;
214 }
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
_In_ DD_SURFACE_LOCAL * pSurface
Definition: winddi.h:3481
BOOL(APIENTRY * PGD_ENGUNLOCKDIRECTDRAWSURFACE)(PDD_SURFACE_LOCAL)
Definition: intddraw.h:109
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8
#define DXG_INDEX_DxDdUnlockDirectDrawSurface
Definition: dxg.h:99

◆ HeapVidMemAllocAligned()

FLATPTR APIENTRY HeapVidMemAllocAligned ( LPVIDMEM  lpVidMem,
DWORD  dwWidth,
DWORD  dwHeight,
LPSURFACEALIGNMENT  lpAlignment,
LPLONG  lpNewPitch 
)

Definition at line 20 of file eng.c.

25 {
27 
28  if (pfnHeapVidMemAllocAligned == NULL)
29  {
30  DPRINT1("Warning: no pfnHeapVidMemAllocAligned\n");
31  return 0;
32  }
33 
34  DPRINT1("Calling dxg.sys pfnHeapVidMemAllocAligned\n");
35  return pfnHeapVidMemAllocAligned(lpVidMem, dwWidth, dwHeight, lpAlignment, lpNewPitch);
36 }
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR dwHeight[]
Definition: provider.c:63
#define DXG_INDEX_DxDdHeapVidMemAllocAligned
Definition: dxg.h:94
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
FLATPTR(APIENTRY * PGD_HEAPVIDMEMALLOCALIGNED)(LPVIDMEM, DWORD, DWORD, LPSURFACEALIGNMENT, LPLONG)
Definition: intddraw.h:104
#define DPRINT1
Definition: precomp.h:8
static const WCHAR dwWidth[]
Definition: provider.c:62

◆ VidMemFree()

VOID APIENTRY VidMemFree ( LPVMEMHEAP  pvmh,
FLATPTR  ptr 
)

Definition at line 43 of file eng.c.

45 {
47 
48  if (pfnVidMemFree == NULL)
49  {
50  DPRINT1("Warning: no pfnVidMemFree\n");
51  }
52  else
53  {
54  DPRINT1("Calling dxg.sys pfnVidMemFree\n");
55  pfnVidMemFree(pvmh, ptr);
56  }
57 }
VOID(APIENTRY * PGD_VIDMEMFREE)(LPVMEMHEAP, FLATPTR)
Definition: intddraw.h:105
#define DXG_INDEX_DxDdHeapVidMemFree
Definition: dxg.h:95
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8