Author: jimtabor
Date: Tue Jan 8 06:48:08 2008
New Revision: 31660
URL:
http://svn.reactos.org/svn/reactos?rev=31660&view=rev
Log:
Remove unused flags and start using new dc type ids.
Modified:
trunk/reactos/include/reactos/win32k/ntgdihdl.h
trunk/reactos/subsystems/win32/win32k/include/dc.h
trunk/reactos/subsystems/win32/win32k/objects/arc.c
trunk/reactos/subsystems/win32/win32k/objects/bitblt.c
trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c
trunk/reactos/subsystems/win32/win32k/objects/color.c
trunk/reactos/subsystems/win32/win32k/objects/dc.c
trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
trunk/reactos/subsystems/win32/win32k/objects/line.c
trunk/reactos/subsystems/win32/win32k/objects/print.c
trunk/reactos/subsystems/win32/win32k/objects/text.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 Tue Jan 8 06:48:08 2008
@@ -394,7 +394,6 @@
INT saveLevel; // DCLEVEL lSaveDepth
HDC hSelf; // DCLEVEL hdcSave Used only for MemoryDC & SaveDC.
- BOOL IsIC; // Use DC_Type
HPALETTE PalIndexed;
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 Tue Jan 8 06:48:08 2008
@@ -5,12 +5,8 @@
#include "driver.h"
/* DC flags */
-#define DC_MEMORY 0x0001 /* It is a memory DC */
#define DC_SAVED 0x0002 /* It is a saved DC */
#define DC_DIRTY 0x0004 /* hVisRgn has to be updated */
-#define DC_THUNKHOOK 0x0008 /* DC hook is in the 16-bit code */
-
-#define GDI_DC_TYPE (1)
// GDIDEVICE flags
#define PDEV_DISPLAY 0x00000001 // Display device
Modified: trunk/reactos/subsystems/win32/win32k/objects/arc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/arc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/arc.c Tue Jan 8 06:48:08 2008
@@ -90,7 +90,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (dc->IsIC)
+ if (dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */
Modified: trunk/reactos/subsystems/win32/win32k/objects/bitblt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/bitblt.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/bitblt.c Tue Jan 8 06:48:08 2008
@@ -58,7 +58,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (DCDest->IsIC)
+ if (DCDest->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(DCDest);
/* Yes, Windows really returns TRUE in this case */
@@ -75,7 +75,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (DCSrc->IsIC)
+ if (DCSrc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(DCSrc);
DC_UnlockDc(DCDest);
@@ -204,7 +204,7 @@
DPRINT("Invalid destination dc handle (0x%08x) passed to NtGdiBitBlt\n",
hDCDest);
return FALSE;
}
- if (DCDest->IsIC)
+ if (DCDest->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(DCDest);
/* Yes, Windows really returns TRUE in this case */
@@ -222,7 +222,7 @@
DPRINT("Invalid source dc handle (0x%08x) passed to NtGdiBitBlt\n",
hDCSrc);
return FALSE;
}
- if (DCSrc->IsIC)
+ if (DCSrc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(DCSrc);
DC_UnlockDc(DCDest);
@@ -424,7 +424,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (DCDest->IsIC)
+ if (DCDest->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(DCDest);
/* Yes, Windows really returns TRUE in this case */
@@ -442,7 +442,7 @@
{
DCSrc = DCDest;
}
- if (DCSrc->IsIC)
+ if (DCSrc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(DCSrc);
if(hdcDst != hdcSrc)
@@ -814,7 +814,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (DCDest->IsIC)
+ if (DCDest->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(DCDest);
/* Yes, Windows really returns TRUE in this case */
@@ -833,7 +833,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (DCSrc->IsIC)
+ if (DCSrc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(DCSrc);
DC_UnlockDc(DCDest);
@@ -1103,7 +1103,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (dc->IsIC)
+ if (dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */
@@ -1155,7 +1155,7 @@
}
Dc_Attr = dc->pDc_Attr;
if(!Dc_Attr) Dc_Attr = &dc->Dc_Attr;
- if (dc->IsIC)
+ if (dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */
Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c Tue Jan 8 06:48:08 2008
@@ -257,7 +257,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return Result;
}
- if (dc->IsIC)
+ if (dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
return Result;
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 Tue Jan 8 06:48:08 2008
@@ -548,7 +548,7 @@
// The RealizePalette function modifies the palette for the device associated with the
specified device context. If the
// device context is a memory DC, the color table for the bitmap selected into the DC
is modified. If the device
// context is a display DC, the physical palette for that device is modified.
- if(dc->w.flags == DC_MEMORY)
+ if(dc->DC_Type == DC_TYPE_MEMORY)
{
// Memory managed DC
ASSERT(sysGDI->NumColors <= 256);
@@ -571,7 +571,7 @@
PALETTE_UnlockPalette(palGDI);
// Step 3: Create the XLATEOBJ for device managed DCs
- if(dc->w.flags != DC_MEMORY)
+ if(dc->DC_Type != DC_TYPE_MEMORY)
{
// Device managed DC
palGDI->logicalToSystem = IntEngCreateXlate(sysMode, palMode, systemPalette,
dc->w.hPalette);
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 Tue Jan 8 06:48:08 2008
@@ -62,7 +62,6 @@
HDC hNewDC, DisplayDC;
HRGN hVisRgn;
UNICODE_STRING DriverName;
- INT DC_Type = DC_TYPE_DIRECT;
DisplayDC = NULL;
if (hDC == NULL)
@@ -74,7 +73,6 @@
return NULL;
}
hDC = DisplayDC;
- DC_Type = DC_TYPE_MEMORY; // Null hDC == Memory DC.
}
/* Allocate a new DC based on the original DC's device */
@@ -106,8 +104,6 @@
/* Copy information from original DC to new DC */
NewDC->hSelf = hNewDC;
- NewDC->IsIC = FALSE;
- NewDC->DC_Type = DC_Type;
NewDC->PDev = OrigDC->PDev;
@@ -131,7 +127,7 @@
}
return NULL;
}
- NewDC->w.flags = DC_MEMORY;
+ NewDC->DC_Type = DC_TYPE_MEMORY; // Always!
NewDC->w.hBitmap = hBitmap;
NewDC->w.hFirstBitmap = hBitmap;
NewDC->pPDev = OrigDC->pPDev;
@@ -802,7 +798,6 @@
if(!nDc_Attr) nDc_Attr = &NewDC->Dc_Attr;
NewDC->DC_Type = DC_TYPE_DIRECT;
- NewDC->IsIC = CreateAsIC;
NewDC->PDev = PrimarySurface.hPDev;
if(pUMdhpdev) pUMdhpdev = NewDC->PDev; // set DHPDEV for device.
@@ -974,7 +969,7 @@
NtGdiSelectBrush (DCHandle, STOCK_WHITE_BRUSH);
NtGdiSelectFont (DCHandle, STOCK_SYSTEM_FONT);
DC_LockDC (DCHandle); NtGdiSelectXxx does not recognize stock objects yet */
- if (DCToDelete->w.flags & DC_MEMORY)
+ if (DCToDelete->DC_Type == DC_TYPE_MEMORY)
{
NtGdiDeleteObject (DCToDelete->w.hFirstBitmap);
}
@@ -1256,7 +1251,7 @@
nDc_Attr->szlViewportExt = Dc_Attr->szlViewportExt;
newdc->saveLevel = 0;
- newdc->IsIC = dc->IsIC;
+ newdc->DC_Type = dc->DC_Type;
#if 0
PATH_InitGdiPath( &newdc->w.path );
@@ -1330,7 +1325,7 @@
Dc_Attr->szlViewportExt = sDc_Attr->szlViewportExt;
dc->PalIndexed = dcs->PalIndexed;
- if (!(dc->w.flags & DC_MEMORY))
+ if (dc->DC_Type != DC_TYPE_MEMORY)
{
dc->w.bitsPerPixel = dcs->w.bitsPerPixel;
}
@@ -1928,7 +1923,7 @@
if(!pDc_Attr) pDc_Attr = &pDC->Dc_Attr;
/* must be memory dc to select bitmap */
- if (!(pDC->w.flags & DC_MEMORY))
+ if (pDC->DC_Type != DC_TYPE_MEMORY)
{
DC_UnlockDc(pDC);
return NULL;
Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c Tue Jan 8 06:48:08 2008
@@ -33,7 +33,7 @@
UINT Index;
if (!(dc = DC_LockDc(hDC))) return 0;
- if (dc->IsIC)
+ if (dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
return 0;
@@ -91,7 +91,7 @@
UINT Index;
if (!(dc = DC_LockDc(hDC))) return 0;
- if (dc->IsIC)
+ if (dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
return 0;
@@ -297,7 +297,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return 0;
}
- if (Dc->IsIC)
+ if (Dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(Dc);
return 0;
@@ -351,7 +351,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return 0;
}
- if (pDC->IsIC)
+ if (pDC->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(pDC);
return 0;
@@ -466,7 +466,7 @@
/* Get handle for the palette in DC. */
Dc = DC_LockDc(hDC);
if (Dc == NULL) return 0;
- if (Dc->IsIC)
+ if (Dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(Dc);
return 0;
Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/fillshap.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/fillshap.c Tue Jan 8 06:48:08 2008
@@ -226,7 +226,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (dc->IsIC)
+ if (dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */
@@ -665,7 +665,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (dc->IsIC)
+ if (dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */
@@ -861,7 +861,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (dc->IsIC)
+ if (dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */
@@ -1155,7 +1155,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (dc->IsIC)
+ if (dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */
@@ -1461,7 +1461,7 @@
DPRINT1("NtGdiRoundRect() - hDC is invalid\n");
SetLastWin32Error(ERROR_INVALID_HANDLE);
}
- else if (dc->IsIC)
+ else if (dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */
@@ -1599,7 +1599,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (dc->IsIC)
+ if (dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */
Modified: trunk/reactos/subsystems/win32/win32k/objects/line.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/line.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/line.c Tue Jan 8 06:48:08 2008
@@ -393,7 +393,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (dc->IsIC)
+ if (dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */
Modified: trunk/reactos/subsystems/win32/win32k/objects/print.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/print.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/print.c Tue Jan 8 06:48:08 2008
@@ -173,7 +173,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return -1;
}
- if ( pDC->IsIC )
+ if ( pDC->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(pDC);
return 0;
Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/text.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/text.c Tue Jan 8 06:48:08 2008
@@ -1567,7 +1567,7 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (dc->IsIC)
+ if (dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */