Author: tkreuzer
Date: Wed Apr  8 22:10:33 2009
New Revision: 40420

URL: http://svn.reactos.org/svn/reactos?rev=40420&view=rev
Log:
Remove IntGdiSelectBrush and IntGdiSelectBrush, they are not needed anymore and 
superceded by DC_vUpdateFillBrush and DC_vUpdateLineBrush.

Modified:
    trunk/reactos/subsystems/win32/win32k/include/dc.h
    trunk/reactos/subsystems/win32/win32k/objects/bitblt.c
    trunk/reactos/subsystems/win32/win32k/objects/dcobjs.c
    trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
    trunk/reactos/subsystems/win32/win32k/objects/path.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=40420&r1=40419&r2=40420&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] Wed Apr  8 
22:10:33 2009
@@ -180,8 +180,6 @@
 HDC FASTCALL IntGdiCreateDisplayDC(HDEV hDev, ULONG DcType, BOOL EmptyDC);
 BOOL FASTCALL IntGdiCleanDC(HDC hDC);
 VOID FASTCALL IntvGetDeviceCaps(PPDEVOBJ, PDEVCAPS);
-HPEN FASTCALL IntGdiSelectPen(PDC,HPEN);
-HBRUSH FASTCALL IntGdiSelectBrush(PDC,HBRUSH);
 INT FASTCALL IntGdiGetDeviceCaps(PDC,INT);
 
 extern PPDEVOBJ pPrimarySurface;

Modified: trunk/reactos/subsystems/win32/win32k/objects/bitblt.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/bitblt.c?rev=40420&r1=40419&r2=40420&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] Wed Apr 
 8 22:10:33 2009
@@ -1047,8 +1047,8 @@
 
     pdcattr = dc->pdcattr;
 
-    if (pdcattr->ulDirty_ & DC_BRUSH_DIRTY)
-        IntGdiSelectBrush(dc,pdcattr->hbrush);
+    if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
+        DC_vUpdateFillBrush(dc);
 
     for (r = pRects, i = 0; i < cRects; i++)
     {
@@ -1110,8 +1110,8 @@
 
     pdcattr = dc->pdcattr;
 
-    if (pdcattr->ulDirty_ & DC_BRUSH_DIRTY)
-        IntGdiSelectBrush(dc,pdcattr->hbrush);
+    if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
+        DC_vUpdateFillBrush(dc);
 
     pbrush = BRUSH_LockBrush(pdcattr->hbrush);
     if (pbrush == NULL)

Modified: trunk/reactos/subsystems/win32/win32k/objects/dcobjs.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/dcobjs.c?rev=40420&r1=40419&r2=40420&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dcobjs.c [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dcobjs.c [iso-8859-1] Wed Apr 
 8 22:10:33 2009
@@ -284,49 +284,6 @@
     return oldPal;
 }
 
-HBRUSH
-FASTCALL
-IntGdiSelectBrush(
-    PDC pDC,
-    HBRUSH hBrush)
-{
-    PDC_ATTR pdcattr;
-    HBRUSH hOrgBrush;
-
-    if (pDC == NULL || hBrush == NULL) return NULL;
-
-    pdcattr = pDC->pdcattr;
-
-    hOrgBrush = pdcattr->hbrush;
-    pdcattr->hbrush = hBrush;
-
-    DC_vUpdateFillBrush(pDC);
-
-    return hOrgBrush;
-}
-
-HPEN
-FASTCALL
-IntGdiSelectPen(
-    PDC pDC,
-    HPEN hPen)
-{
-    PDC_ATTR pdcattr;
-    HPEN hOrgPen = NULL;
-
-    if (pDC == NULL || hPen == NULL) return NULL;
-
-    pdcattr = pDC->pdcattr;
-
-    hOrgPen = pdcattr->hpen;
-    pdcattr->hpen = hPen;
-
-    DC_vUpdateLineBrush(pDC);
-
-    return hOrgPen;
-}
-
-
  /*
  * @implemented
  */
@@ -347,7 +304,7 @@
         return NULL;
     }
 
-//    hOrgBrush = IntGdiSelectBrush(pDC,hBrush);
+    /* Simply return the user mode value, without checking */
     hOrgBrush = pDC->pdcattr->hbrush;
     pDC->pdcattr->hbrush = hBrush;
     DC_vUpdateFillBrush(pDC);
@@ -377,7 +334,7 @@
         return NULL;
     }
 
-//    hOrgPen = IntGdiSelectPen(pDC, hPen);
+    /* Simply return the user mode value, without checking */
     hOrgPen = pDC->pdcattr->hpen;
     pDC->pdcattr->hpen = hPen;
     DC_vUpdateLineBrush(pDC);
@@ -547,11 +504,11 @@
     }
     pdcattr = pdc->pdcattr;
 
-    if (pdcattr->ulDirty_ & DC_BRUSH_DIRTY)
-        IntGdiSelectBrush(pdc, pdcattr->hbrush);
-
-    if (pdcattr->ulDirty_ & DC_PEN_DIRTY)
-        IntGdiSelectPen(pdc, pdcattr->hpen);
+    if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
+        DC_vUpdateFillBrush(pdc);
+
+    if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
+        DC_vUpdateLineBrush(pdc);
 
     switch(ObjectType)
     {

Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/fillshap.c?rev=40420&r1=40419&r2=40420&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] Wed 
Apr  8 22:10:33 2009
@@ -243,11 +243,11 @@
 
     pdcattr = dc->pdcattr;
 
-    if (pdcattr->ulDirty_ & DC_BRUSH_DIRTY)
-       IntGdiSelectBrush(dc,pdcattr->hbrush);
-
-    if (pdcattr->ulDirty_ & DC_PEN_DIRTY)
-       IntGdiSelectPen(dc,pdcattr->hpen);
+    if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
+        DC_vUpdateFillBrush(dc);
+
+    if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
+        DC_vUpdateLineBrush(dc);
 
     pbrush = PEN_LockPen(pdcattr->hpen);
     if (!pbrush)
@@ -726,11 +726,11 @@
 
     pdcattr = dc->pdcattr;
 
-    if (pdcattr->ulDirty_ & DC_BRUSH_DIRTY)
-       IntGdiSelectBrush(dc,pdcattr->hbrush);
-
-    if (pdcattr->ulDirty_ & DC_PEN_DIRTY)
-       IntGdiSelectPen(dc,pdcattr->hpen);
+    if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
+        DC_vUpdateFillBrush(dc);
+
+    if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
+        DC_vUpdateLineBrush(dc);
 
     pbrushLine = PEN_LockPen(pdcattr->hpen);
     if (!pbrushLine)

Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/path.c?rev=40420&r1=40419&r2=40420&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] Wed Apr  
8 22:10:33 2009
@@ -2294,8 +2294,8 @@
 
   pdcattr = dc->pdcattr;
 
-  if (pdcattr->ulDirty_ & DC_BRUSH_DIRTY)
-     IntGdiSelectBrush(dc,pdcattr->hbrush);
+  if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
+      DC_vUpdateLineBrush(dc);
 
   ret = PATH_FillPath( dc, pPath );
   if ( ret )
@@ -2569,10 +2569,11 @@
 
   pdcattr = pDc->pdcattr;
 
-  if (pdcattr->ulDirty_ & DC_BRUSH_DIRTY)
-     IntGdiSelectBrush(pDc,pdcattr->hbrush);
-  if (pdcattr->ulDirty_ & DC_PEN_DIRTY)
-     IntGdiSelectPen(pDc,pdcattr->hpen);
+  if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
+    DC_vUpdateFillBrush(pDc);
+
+  if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
+    DC_vUpdateLineBrush(pDc);
 
   bRet = PATH_FillPath(pDc, pPath);
   if (bRet) bRet = PATH_StrokePath(pDc, pPath);
@@ -2608,8 +2609,8 @@
 
   pdcattr = pDc->pdcattr;
 
-  if (pdcattr->ulDirty_ & DC_PEN_DIRTY)
-     IntGdiSelectPen(pDc,pdcattr->hpen);
+  if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
+     DC_vUpdateLineBrush(pDc);
 
   bRet = PATH_StrokePath(pDc, pPath);
   PATH_EmptyPath(pPath);

Reply via email to