Add new dxdd support members to gdi device structure.

svn path=/trunk/; revision=31573
This commit is contained in:
James Tabor
2008-01-02 22:17:59 +00:00
parent 46bfef770b
commit 420a4b869c
3 changed files with 46 additions and 36 deletions
+39 -29
View File
@@ -33,56 +33,66 @@
typedef struct _GDIPOINTER /* should stay private to ENG */
{
/* private GDI pointer handling information, required for software emulation */
BOOL Enabled;
POINTL Pos;
SIZEL Size;
POINTL HotSpot;
BOOL Enabled;
POINTL Pos;
SIZEL Size;
POINTL HotSpot;
XLATEOBJ *XlateObject;
HSURF ColorSurface;
HSURF MaskSurface;
HSURF SaveSurface;
int ShowPointer; /* counter negtive do not show the mouse postive show the mouse */
HSURF ColorSurface;
HSURF MaskSurface;
HSURF SaveSurface;
int ShowPointer; /* counter negtive do not show the mouse postive show the mouse */
/* public pointer information */
RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */
RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */
PGD_MOVEPOINTER MovePointer;
ULONG Status;
ULONG Status;
} GDIPOINTER, *PGDIPOINTER;
typedef struct _GDIDEVICE
{
HANDLE Handle; // HSURF
PVOID pvEntry;
ULONG lucExcLock;
ULONG Tid;
HANDLE hHmgr;
ULONG csCount;
ULONG lucExcLock;
PVOID Tid;
struct _GDIDEVICE *ppdevNext;
FLONG flFlags;
PERESOURCE hsemDevLock;
INT cPdevRefs;
INT cPdevOpenRefs;
struct _GDIDEVICE *ppdevParent;
FLONG flFlags;
PERESOURCE hsemDevLock; // Device lock.
PVOID pvGammaRamp;
PVOID pvGammaRamp; // Gamma ramp pointer.
DHPDEV hPDev;
DEVMODEW DMW;
HSURF FillPatterns[HS_DDI_MAX];
DEVINFO DevInfo;
GDIINFO GDIInfo;
DHPDEV hPDev; // DHPDEV for device.
HANDLE hSpooler;
ULONG DisplayNumber;
HSURF FillPatterns[HS_DDI_MAX];
PFILE_OBJECT VideoFileObject;
BOOLEAN PreparedDriver;
GDIPOINTER Pointer;
ULONG DxDD_Data;
DEVINFO DevInfo;
GDIINFO GDIInfo;
HSURF pSurface; // SURFACE for this device.
HANDLE hSpooler; // Handle to spooler, if spooler dev driver.
ULONG DisplayNumber;
PVOID pGraphicsDev; // PGRAPHICS_DEVICE see VideoFileObject
DEVMODEW DMW;
PVOID pdmwDev; // Ptr->DEVMODEW.dmSize + dmDriverExtra == alloc size.
FLONG DxDd_Flags; // DxDD active status flags.
PFILE_OBJECT VideoFileObject;
BOOLEAN PreparedDriver;
GDIPOINTER Pointer;
/* Stuff to keep track of software cursors; win32k gdi part */
UINT SafetyRemoveLevel; /* at what level was the cursor removed?
0 for not removed */
UINT SafetyRemoveCount;
struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl;
DRIVER_FUNCTIONS DriverFunctions;
struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl;
} GDIDEVICE, *PGDIDEVICE;
/* Internal functions */
+6 -6
View File
@@ -622,9 +622,9 @@ IntCreatePrimarySurface()
DPRINT("calling EnableSurface\n");
/* Enable the drawing surface */
PrimarySurface.Handle =
PrimarySurface.pSurface =
PrimarySurface.DriverFunctions.EnableSurface(PrimarySurface.hPDev);
if (NULL == PrimarySurface.Handle)
if (NULL == PrimarySurface.pSurface)
{
/* PrimarySurface.DriverFunctions.AssertMode(PrimarySurface.hPDev, FALSE);*/
PrimarySurface.DriverFunctions.DisablePDEV(PrimarySurface.hPDev);
@@ -643,7 +643,7 @@ IntCreatePrimarySurface()
/* attach monitor */
IntAttachMonitor(&PrimarySurface, PrimarySurface.DisplayNumber);
SurfObj = EngLockSurface((HSURF)PrimarySurface.Handle);
SurfObj = EngLockSurface(PrimarySurface.pSurface);
SurfObj->dhpdev = PrimarySurface.hPDev;
SurfSize = SurfObj->sizlBitmap;
SurfaceRect.left = SurfaceRect.top = 0;
@@ -791,7 +791,7 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
NewDC->PDev = PrimarySurface.hPDev;
if(pUMdhpdev) pUMdhpdev = NewDC->PDev;
NewDC->pPDev = (PVOID)&PrimarySurface;
NewDC->w.hBitmap = PrimarySurface.Handle;
NewDC->w.hBitmap = (HBITMAP)PrimarySurface.pSurface;
NewDC->w.bitsPerPixel = ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.cBitsPixel *
((PGDIDEVICE)NewDC->pPDev)->GDIInfo.cPlanes;
@@ -2668,11 +2668,11 @@ DC_UnlockDisplay(HDC hDC)
BOOL FASTCALL
IntIsPrimarySurface(SURFOBJ *SurfObj)
{
if (PrimarySurface.Handle == NULL)
if (PrimarySurface.pSurface == NULL)
{
return FALSE;
}
return SurfObj->hsurf == PrimarySurface.Handle;
return SurfObj->hsurf == PrimarySurface.pSurface;
}
//
@@ -49,7 +49,7 @@ SynchonizeDriver(FLONG Flags)
Device = IntEnumHDev();
SurfObj = EngLockSurface((HSURF)Device->Handle);
SurfObj = EngLockSurface( Device->pSurface );
if(!SurfObj) return;
DoDeviceSync( SurfObj, NULL, Flags);
EngUnlockSurface(SurfObj);