[ros-diffs] [tkreuzer] 32832: DC_SetOwnership: use GDIOBJ_SetOwnership instead of GDIOB_CopyOwnership, which is faster. Also rename DC to pDC, a variable shouldn't have the same name as a type.

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Thu Apr 3 22:27:51 CEST 2008


Author: tkreuzer
Date: Thu Apr  3 15:27:50 2008
New Revision: 32832

URL: http://svn.reactos.org/svn/reactos?rev=32832&view=rev
Log:
DC_SetOwnership: use GDIOBJ_SetOwnership instead of GDIOB_CopyOwnership, which is faster. Also rename DC to pDC, a variable shouldn't have the same name as a type.

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

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=32832&r1=32831&r2=32832&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 Apr  3 15:27:50 2008
@@ -2522,25 +2522,25 @@
 VOID FASTCALL
 DC_SetOwnership(HDC hDC, PEPROCESS Owner)
 {
-  PDC DC;
-
-  GDIOBJ_SetOwnership(hDC, Owner);
-  DC = DC_LockDc(hDC);
-  if (NULL != DC)
-    {
-      if (NULL != DC->w.hClipRgn)
+    PDC pDC;
+
+    GDIOBJ_SetOwnership(hDC, Owner);
+    pDC = DC_LockDc(hDC);
+    if (pDC)
+    {
+        if (pDC->w.hClipRgn)
         {
-          GDIOBJ_CopyOwnership(hDC, DC->w.hClipRgn);
+            GDIOBJ_SetOwnership(pDC->w.hClipRgn, Owner);
         }
-      if (NULL != DC->w.hVisRgn)
+        if (pDC->w.hVisRgn)
         {
-          GDIOBJ_CopyOwnership(hDC, DC->w.hVisRgn);
+            GDIOBJ_SetOwnership(pDC->w.hVisRgn, Owner);
         }
-      if (NULL != DC->w.hGCClipRgn)
+        if (pDC->w.hGCClipRgn)
         {
-          GDIOBJ_CopyOwnership(hDC, DC->w.hGCClipRgn);
+            GDIOBJ_SetOwnership(pDC->w.hGCClipRgn, Owner);
         }
-      DC_UnlockDc(DC);
+        DC_UnlockDc(pDC);
     }
 }
 



More information about the Ros-diffs mailing list