[ros-diffs] [jimtabor] 31573: Add new dxdd support members to gdi device structure.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Wed Jan 2 23:17:59 CET 2008


Author: jimtabor
Date: Thu Jan  3 01:17:59 2008
New Revision: 31573

URL: http://svn.reactos.org/svn/reactos?rev=31573&view=rev
Log:
Add new dxdd support members to gdi device structure.

Modified:
    trunk/reactos/subsystems/win32/win32k/include/dc.h
    trunk/reactos/subsystems/win32/win32k/objects/dc.c
    trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c

Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/include/dc.h?rev=31573&r1=31572&r2=31573&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/dc.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/dc.h Thu Jan  3 01:17:59 2008
@@ -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;
 
+  DRIVER_FUNCTIONS DriverFunctions;
   struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl;
-
-  DRIVER_FUNCTIONS DriverFunctions;
 } GDIDEVICE, *PGDIDEVICE;
 
 /*  Internal functions  */

Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/dc.c?rev=31573&r1=31572&r2=31573&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Thu Jan  3 01:17:59 2008
@@ -622,9 +622,9 @@
 
    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 @@
    /* 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 @@
   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 @@
 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;
 }
 
 //

Modified: trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c?rev=31573&r1=31572&r2=31573&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c Thu Jan  3 01:17:59 2008
@@ -49,7 +49,7 @@
 
   Device = IntEnumHDev();
 
-  SurfObj = EngLockSurface((HSURF)Device->Handle);
+  SurfObj = EngLockSurface( Device->pSurface );
   if(!SurfObj) return;
   DoDeviceSync( SurfObj, NULL, Flags);
   EngUnlockSurface(SurfObj);




More information about the Ros-diffs mailing list