Author: jimtabor
Date: Mon Nov 12 09:43:44 2007
New Revision: 30374
URL:
http://svn.reactos.org/svn/reactos?rev=30374&view=rev
Log:
3rd FIN.
Modified:
trunk/reactos/include/reactos/win32k/ntgdihdl.h
trunk/reactos/subsystems/win32/win32k/include/dc.h
trunk/reactos/subsystems/win32/win32k/ntuser/metric.c
trunk/reactos/subsystems/win32/win32k/objects/color.c
trunk/reactos/subsystems/win32/win32k/objects/coord.c
trunk/reactos/subsystems/win32/win32k/objects/dc.c
Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntgdihdl.h (original)
+++ trunk/reactos/include/reactos/win32k/ntgdihdl.h Mon Nov 12 09:43:44 2007
@@ -505,9 +505,7 @@
DC_ATTR Dc_Attr;
HDC hNext;
HDC hPrev;
-// Old tymerz! Cant code? So just Haxzorcise it!
-// How many pointers to devices do we need?
- PGDIINFO GDIInfo; // In GDIDEVICE
+
UNICODE_STRING DriverName;
CLIPOBJ *CombinedClip;
Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/dc.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/dc.h Mon Nov 12 09:43:44 2007
@@ -36,16 +36,25 @@
typedef struct
{
HANDLE Handle;
+ PVOID pvEntry;
+ ULONG lucExcLock;
+ ULONG Tid;
+
+ PERESOURCE_XP hsemDevLock;
+
+ PVOID pfnSync;
+
DHPDEV PDev;
DEVMODEW DMW;
HSURF FillPatterns[HS_DDI_MAX];
DEVINFO DevInfo;
GDIINFO GDIInfo;
+ HANDLE hSpooler;
+ ULONG DisplayNumber;
+
PFILE_OBJECT VideoFileObject;
BOOLEAN PreparedDriver;
- ULONG DisplayNumber;
-
GDIPOINTER Pointer;
/* Stuff to keep track of software cursors; win32k gdi part */
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/metric.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/metric.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/metric.c Mon Nov 12 09:43:44 2007
@@ -167,8 +167,8 @@
ScreenDC = DC_LockDc(ScreenDCHandle);
if (NULL != ScreenDC)
{
- Width = ScreenDC->GDIInfo->ulHorzRes;
- Height = ScreenDC->GDIInfo->ulVertRes;
+ Width = ((PGDIDEVICE)ScreenDC->pPDev)->GDIInfo.ulHorzRes;
+ Height = ((PGDIDEVICE)ScreenDC->pPDev)->GDIInfo.ulVertRes;
DC_UnlockDc(ScreenDC);
}
NtGdiDeleteObjectApp(ScreenDCHandle);
Modified: trunk/reactos/subsystems/win32/win32k/objects/color.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/color.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/color.c Mon Nov 12 09:43:44 2007
@@ -451,7 +451,7 @@
}
else
{
- Ret = dc->GDIInfo->ulNumPalReg;
+ Ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulNumPalReg;
}
}
Modified: trunk/reactos/subsystems/win32/win32k/objects/coord.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/coord.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/coord.c Mon Nov 12 09:43:44 2007
@@ -37,8 +37,8 @@
void FASTCALL
IntFixIsotropicMapping(PDC dc)
{
- ULONG xdim = EngMulDiv(dc->Dc_Attr.szlViewportExt.cx, dc->GDIInfo->ulHorzSize,
dc->GDIInfo->ulHorzRes) / dc->Dc_Attr.szlWindowExt.cx;
- ULONG ydim = EngMulDiv(dc->Dc_Attr.szlViewportExt.cy, dc->GDIInfo->ulVertSize,
dc->GDIInfo->ulVertRes) / dc->Dc_Attr.szlWindowExt.cy;
+ ULONG xdim = EngMulDiv(dc->Dc_Attr.szlViewportExt.cx,
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzSize,
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes) / dc->Dc_Attr.szlWindowExt.cx;
+ ULONG ydim = EngMulDiv(dc->Dc_Attr.szlViewportExt.cy,
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertSize,
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes) / dc->Dc_Attr.szlWindowExt.cy;
if (xdim > ydim)
{
@@ -639,38 +639,38 @@
case MM_LOMETRIC:
case MM_ISOTROPIC:
- dc->Dc_Attr.szlWindowExt.cx = dc->GDIInfo->ulHorzSize * 10;
- dc->Dc_Attr.szlWindowExt.cy = dc->GDIInfo->ulVertSize * 10;
- dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes;
- dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes;
+ dc->Dc_Attr.szlWindowExt.cx =
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzSize * 10;
+ dc->Dc_Attr.szlWindowExt.cy =
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertSize * 10;
+ dc->Dc_Attr.szlViewportExt.cx =
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes;
+ dc->Dc_Attr.szlViewportExt.cy =
-((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes;
break;
case MM_HIMETRIC:
- dc->Dc_Attr.szlWindowExt.cx = dc->GDIInfo->ulHorzSize * 100;
- dc->Dc_Attr.szlWindowExt.cy = dc->GDIInfo->ulVertSize * 100;
- dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes;
- dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes;
+ dc->Dc_Attr.szlWindowExt.cx =
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzSize * 100;
+ dc->Dc_Attr.szlWindowExt.cy =
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertSize * 100;
+ dc->Dc_Attr.szlViewportExt.cx =
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes;
+ dc->Dc_Attr.szlViewportExt.cy =
-((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes;
break;
case MM_LOENGLISH:
- dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(1000, dc->GDIInfo->ulHorzSize,
254);
- dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(1000, dc->GDIInfo->ulVertSize,
254);
- dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes;
- dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes;
+ dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(1000,
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzSize, 254);
+ dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(1000,
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertSize, 254);
+ dc->Dc_Attr.szlViewportExt.cx =
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes;
+ dc->Dc_Attr.szlViewportExt.cy =
-((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes;
break;
case MM_HIENGLISH:
- dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(10000, dc->GDIInfo->ulHorzSize,
254);
- dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(10000, dc->GDIInfo->ulVertSize,
254);
- dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes;
- dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes;
+ dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(10000,
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzSize, 254);
+ dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(10000,
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertSize, 254);
+ dc->Dc_Attr.szlViewportExt.cx =
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes;
+ dc->Dc_Attr.szlViewportExt.cy =
-((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes;
break;
case MM_TWIPS:
- dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(14400, dc->GDIInfo->ulHorzSize,
254);
- dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(14400, dc->GDIInfo->ulVertSize,
254);
- dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes;
- dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes;
+ dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(14400,
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzSize, 254);
+ dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(14400,
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertSize, 254);
+ dc->Dc_Attr.szlViewportExt.cx =
((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes;
+ dc->Dc_Attr.szlViewportExt.cy =
-((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes;
break;
case MM_ANISOTROPIC:
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Mon Nov 12 09:43:44 2007
@@ -210,7 +210,7 @@
NewDC->DC_Type = DC_Type;
NewDC->PDev = OrigDC->PDev;
- NewDC->GDIInfo = OrigDC->GDIInfo;
+
NewDC->w.bitsPerPixel = OrigDC->w.bitsPerPixel;
/* DriverName is copied in the AllocDC routine */
@@ -903,13 +903,13 @@
NewDC->DC_Type = DC_TYPE_DIRECT;
NewDC->IsIC = CreateAsIC;
- NewDC->GDIInfo = &PrimarySurface.GDIInfo;
NewDC->PDev = PrimarySurface.PDev;
if(pUMdhpdev) pUMdhpdev = NewDC->PDev;
NewDC->pPDev = (PVOID)&PrimarySurface;
NewDC->w.hBitmap = PrimarySurface.Handle;
- NewDC->w.bitsPerPixel = NewDC->GDIInfo->cBitsPixel *
NewDC->GDIInfo->cPlanes;
+ NewDC->w.bitsPerPixel = ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.cBitsPixel *
+ ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.cPlanes;
DPRINT("Bits per pel: %u\n", NewDC->w.bitsPerPixel);
if (! CreateAsIC)
@@ -920,8 +920,8 @@
DC_UnlockDc( NewDC );
- hVisRgn = NtGdiCreateRectRgn(0, 0, NewDC->GDIInfo->ulHorzRes,
- NewDC->GDIInfo->ulVertRes);
+ hVisRgn = NtGdiCreateRectRgn(0, 0,
((PGDIDEVICE)NewDC->pPDev)->GDIInfo.ulHorzRes,
+ ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.ulVertRes);
IntGdiSelectVisRgn(hNewDC, hVisRgn);
NtGdiDeleteObject(hVisRgn);
@@ -1536,43 +1536,43 @@
switch (Index)
{
case DRIVERVERSION:
- ret = dc->GDIInfo->ulVersion;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVersion;
break;
case TECHNOLOGY:
- ret = dc->GDIInfo->ulTechnology;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulTechnology;
break;
case HORZSIZE:
- ret = dc->GDIInfo->ulHorzSize;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzSize;
break;
case VERTSIZE:
- ret = dc->GDIInfo->ulVertSize;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertSize;
break;
case HORZRES:
- ret = dc->GDIInfo->ulHorzRes;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes;
break;
case VERTRES:
- ret = dc->GDIInfo->ulVertRes;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes;
break;
case LOGPIXELSX:
- ret = dc->GDIInfo->ulLogPixelsX;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulLogPixelsX;
break;
case LOGPIXELSY:
- ret = dc->GDIInfo->ulLogPixelsY;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulLogPixelsY;
break;
case BITSPIXEL:
- ret = dc->GDIInfo->cBitsPixel;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.cBitsPixel;
break;
case PLANES:
- ret = dc->GDIInfo->cPlanes;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.cPlanes;
break;
case NUMBRUSHES:
@@ -1588,19 +1588,19 @@
break;
case NUMCOLORS:
- ret = dc->GDIInfo->ulNumColors;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulNumColors;
break;
case ASPECTX:
- ret = dc->GDIInfo->ulAspectX;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulAspectX;
break;
case ASPECTY:
- ret = dc->GDIInfo->ulAspectY;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulAspectY;
break;
case ASPECTXY:
- ret = dc->GDIInfo->ulAspectXY;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulAspectXY;
break;
case PDEVICESIZE:
@@ -1612,7 +1612,7 @@
break;
case SIZEPALETTE:
- ret = dc->GDIInfo->ulNumPalReg; /* FIXME not sure */
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulNumPalReg; /* FIXME not sure */
break;
case NUMRESERVED:
@@ -1694,7 +1694,7 @@
break;
case RASTERCAPS:
- ret = dc->GDIInfo->flRaster;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.flRaster;
break;
case CURVECAPS:
@@ -1710,7 +1710,7 @@
break;
case TEXTCAPS:
- ret = dc->GDIInfo->flTextCaps;
+ ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.flTextCaps;
break;
default: