[ros-diffs] [jimtabor] 33656: Removed w.flags from dc.h update all related.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Fri May 23 03:46:55 CEST 2008


Author: jimtabor
Date: Thu May 22 20:46:55 2008
New Revision: 33656

URL: http://svn.reactos.org/svn/reactos?rev=33656&view=rev
Log:
Removed w.flags from dc.h update all related.

Modified:
    trunk/reactos/subsystems/win32/win32k/include/dc.h
    trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c
    trunk/reactos/subsystems/win32/win32k/objects/dc.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=33656&r1=33655&r2=33656&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Thu May 22 20:46:55 2008
@@ -13,10 +13,6 @@
 #define DCPATH_ACTIVE    0x0001
 #define DCPATH_SAVE      0x0002
 #define DCPATH_CLOCKWISE 0x0004
-
-  /* DC flags */
-#define DC_SAVED      0x0002   /* It is a saved DC */
-#define DC_DIRTY      0x0004   /* hVisRgn has to be updated */
 
 // GDIDEVICE flags
 #define PDEV_DISPLAY             0x00000001 // Display device
@@ -56,8 +52,6 @@
 
 typedef struct _WIN_DC_INFO
 {
-  int      flags;
-
   HRGN     hClipRgn;     /* Clip region (may be 0) */
   HRGN     hrgnMeta;     /* Meta region (may be 0) */
   HRGN     hMetaClipRgn; /* Intersection of meta and clip regions (may be 0) */

Modified: trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c?rev=33656&r1=33655&r2=33656&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c [iso-8859-1] Thu May 22 20:46:55 2008
@@ -76,8 +76,8 @@
   	return ERROR;
   }
 
-  dc->w.flags &= ~DC_DIRTY;
-
+  dc->DC_Flags &= ~DC_FLAG_DIRTY_RAO;
+  
   if (dc->w.hVisRgn == NULL)
   {
     dc->w.hVisRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
@@ -101,7 +101,7 @@
                                 int fnMode)
 {
   int retval;
-  //  dc->w.flags &= ~DC_DIRTY;
+  //  dc->DC_Flags &= ~DC_FLAG_DIRTY_RAO;
 
   if (!hrgn)
   {

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=33656&r1=33655&r2=33656&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Thu May 22 20:46:55 2008
@@ -1019,7 +1019,7 @@
   }
 
   /*  Free GDI resources allocated to this DC  */
-  if (!(DCToDelete->w.flags & DC_SAVED))
+  if (!(DCToDelete->DcLevel.flPath & DCPATH_SAVE))
   {
     /*
     NtGdiSelectPen (DCHandle, STOCK_BLACK_PEN);
@@ -1332,7 +1332,7 @@
   nDc_Attr = newdc->pDc_Attr;
   if(!nDc_Attr) nDc_Attr = &newdc->Dc_Attr;
 
-  newdc->w.flags            = dc->w.flags | DC_SAVED;
+  newdc->DcLevel.flPath     = dc->DcLevel.flPath | DCPATH_SAVE;
   nDc_Attr->dwLayout        = Dc_Attr->dwLayout;
   nDc_Attr->hpen            = Dc_Attr->hpen;
   nDc_Attr->hbrush          = Dc_Attr->hbrush;
@@ -1405,7 +1405,7 @@
   sDc_Attr = dcs->pDc_Attr;
   if(!sDc_Attr) sDc_Attr = &dcs->Dc_Attr;
 
-  dc->w.flags              = dcs->w.flags & ~DC_SAVED;
+  dc->DcLevel.flPath       = dcs->DcLevel.flPath & ~DCPATH_SAVE;
 
   dc->w.hFirstBitmap       = dcs->w.hFirstBitmap;
 
@@ -1539,7 +1539,7 @@
     dcs = DC_LockDc ( hDCSave );
     if ( dcs )
     {
-      if ( dcs->w.flags & DC_SAVED )
+      if ( dcs->DcLevel.flPath & DCPATH_SAVE )
       {
         IntGdiCopyFromSaveState( dc, dcs, dc->DcLevel.hdcSave);
       }
@@ -2156,7 +2156,7 @@
       return 0;
     }
 
-  wRet = dc->w.flags & DC_DIRTY;
+  wRet = dc->DC_Flags & DC_FLAG_DIRTY_RAO; // Fixme wrong flag!
 
   /* "Undocumented Windows" info is slightly confusing.
    */
@@ -2164,12 +2164,12 @@
   DPRINT("DC %p, Flags %04x\n", hDC, Flags);
 
   if (Flags & DCHF_INVALIDATEVISRGN)
-    {
-      dc->w.flags |= DC_DIRTY;
+    { /* hVisRgn has to be updated */
+      dc->DC_Flags |= DC_FLAG_DIRTY_RAO;
     }
   else if (Flags & DCHF_VALIDATEVISRGN || 0 == Flags)
     {
-      dc->w.flags &= ~DC_DIRTY;
+      dc->DC_Flags &= ~DC_FLAG_DIRTY_RAO;
     }
 
   DC_UnlockDc(dc);



More information about the Ros-diffs mailing list