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. 

svn path=/trunk/; revision=33876
This commit is contained in:
Magnus Olsen 2008-06-07 00:51:38 +00:00
parent b879687075
commit 48150abcea
2 changed files with 12 additions and 0 deletions

View file

@ -30,6 +30,9 @@ typedef INT
#define METAFILE_MEMORY 1 #define METAFILE_MEMORY 1
#define METAFILE_DISK 2 #define METAFILE_DISK 2
/* MACRO ********************************************************************/
#define ROP_USES_SOURCE(Rop) ((Rop << 2) ^ Rop) & 0xCC0000
/* TYPES *********************************************************************/ /* TYPES *********************************************************************/
// Based on wmfapi.h and Wine. // Based on wmfapi.h and Wine.

View file

@ -124,6 +124,9 @@ CreateDIBSection(
return hBitmap; return hBitmap;
} }
/* /*
* @implemented * @implemented
*/ */
@ -139,6 +142,12 @@ BitBlt(HDC hdcDest, /* handle to destination DC */
int nYSrc, /* y-coordinate of source upper-left corner */ int nYSrc, /* y-coordinate of source upper-left corner */
DWORD dwRop) /* raster operation code */ 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, return NtGdiBitBlt(hdcDest,
nXOriginDest, nXOriginDest,
nYOriginDest, nYOriginDest,