Author: greatlrd
Date: Fri Jun 6 19:51:38 2008
New Revision: 33876
URL:
http://svn.reactos.org/svn/reactos?rev=33876&view=rev
Log:
BitBlt
Make it act bit more like windows, use PatBlt instead for BitBlt for no ROP source for it
bit faster
Thx irc Goplat found my bug in the macro.
Modified:
trunk/reactos/dll/win32/gdi32/include/gdi32p.h
trunk/reactos/dll/win32/gdi32/objects/bitmap.c
Modified: trunk/reactos/dll/win32/gdi32/include/gdi32p.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/include/gd…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/include/gdi32p.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/include/gdi32p.h [iso-8859-1] Fri Jun 6 19:51:38 2008
@@ -29,6 +29,9 @@
#define METAFILE_MEMORY 1
#define METAFILE_DISK 2
+
+/* MACRO ********************************************************************/
+#define ROP_USES_SOURCE(Rop) ((Rop << 2) ^ Rop) & 0xCC0000
/* TYPES *********************************************************************/
Modified: trunk/reactos/dll/win32/gdi32/objects/bitmap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/bi…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] Fri Jun 6 19:51:38 2008
@@ -124,6 +124,9 @@
return hBitmap;
}
+
+
+
/*
* @implemented
*/
@@ -139,6 +142,12 @@
int nYSrc, /* y-coordinate of source upper-left corner */
DWORD dwRop) /* raster operation code */
{
+ /* use patBlt for no source blt Like windows does */
+ if (!ROP_USES_SOURCE(dwRop))
+ {
+ return PatBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest,
dwRop);
+ }
+
return NtGdiBitBlt(hdcDest,
nXOriginDest,
nYOriginDest,