Author: tkreuzer
Date: Mon Dec 29 13:11:35 2014
New Revision: 65880

URL: http://svn.reactos.org/svn/reactos?rev=65880&view=rev
Log:
[GDI32]
- Do not call BitBlt from StretchBlt when extension matches, this is handled in 
win32k
- Use GdiGetDcAttr

Modified:
    trunk/reactos/win32ss/gdi/gdi32/objects/painting.c

Modified: trunk/reactos/win32ss/gdi/gdi32/objects/painting.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/objects/painting.c?rev=65880&r1=65879&r2=65880&view=diff
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/objects/painting.c  [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/objects/painting.c  [iso-8859-1] Mon Dec 29 
13:11:35 2014
@@ -66,7 +66,13 @@
         }
     }
 #endif
-    if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) 
&pdcattr)) return FALSE;
+    /* Get the DC attribute */
+    pdcattr = GdiGetDcAttr(hdc);
+    if (pdcattr == NULL)
+    {
+        SetLastError(ERROR_INVALID_PARAMETER);
+        return FALSE;
+    }
 
     if (ppt)
     {
@@ -852,33 +858,18 @@
     _In_ INT cySrc,
     _In_ DWORD dwRop)
 {
-    if ((cxDest != cxSrc) || (cyDest != cySrc))
-    {
-        return NtGdiStretchBlt(hdcDest,
-                               xDest,
-                               yDest,
-                               cxDest,
-                               cyDest,
-                               hdcSrc,
-                               xSrc,
-                               ySrc,
-                               cxSrc,
-                               cySrc,
-                               dwRop,
-                               0);
-    }
-
-    return NtGdiBitBlt(hdcDest,
-                       xDest,
-                       yDest,
-                       cxDest,
-                       cyDest,
-                       hdcSrc,
-                       xSrc,
-                       ySrc,
-                       dwRop,
-                       0,
-                       0);
+    return NtGdiStretchBlt(hdcDest,
+                           xDest,
+                           yDest,
+                           cxDest,
+                           cyDest,
+                           hdcSrc,
+                           xSrc,
+                           ySrc,
+                           cxSrc,
+                           cySrc,
+                           dwRop,
+                           0);
 }
 
 


Reply via email to