Author: fireball
Date: Thu Jul 30 20:52:03 2009
New Revision: 42307
URL:
http://svn.reactos.org/svn/reactos?rev=42307&view=rev
Log:
- Use Xlate object in GreBitBlt. Icons are still black, but have correct shape now.
Modified:
branches/arwinss/reactos/subsystems/win32/win32k/gre/bitblt.c
branches/arwinss/reactos/subsystems/win32/win32k/include/xlateobj.h
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/bitblt.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gre/bitblt.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gre/bitblt.c [iso-8859-1] Thu Jul 30
20:52:03 2009
@@ -161,6 +161,8 @@
POINT BrushOrigin = {0,0};
POINT SourcePoint;
RECTL DestRect;
+ XLATEOBJ *XlateObj = NULL;
+ BOOL UsesSource = ROP3_USES_SOURCE(rop);
DestRect.left = XDest;
DestRect.top = YDest;
@@ -183,13 +185,27 @@
SourcePoint.y += pSrc->rcDcRect.top + pSrc->rcVport.left;
}
+ /* Create the XLATEOBJ */
+ if (UsesSource)
+ {
+ XlateObj = IntCreateXlateForBlt(pDest, pSrc, pDest->pBitmap,
pSrc->pBitmap);
+
+ if (XlateObj == (XLATEOBJ*)-1)
+ {
+ DPRINT1("couldn't create XlateObj\n");
+ SetLastWin32Error(ERROR_NO_SYSTEM_RESOURCES);
+ XlateObj = NULL;
+ return FALSE;
+ }
+ }
+
/* Perform the bitblt operation */
bRet = GrepBitBltEx(
&pDest->pBitmap->SurfObj,
pSrc ? &pSrc->pBitmap->SurfObj : NULL,
NULL,
NULL,//dc->rosdc.CombinedClip,
- NULL,//XlateObj
+ XlateObj,
&DestRect,
&SourcePoint,
NULL,
@@ -197,6 +213,10 @@
&BrushOrigin,
ROP3_TO_ROP4(rop),
TRUE);
+
+ /* Free XlateObj if it was created */
+ if (UsesSource && XlateObj)
+ EngDeleteXlate(XlateObj);
return bRet;
}
Modified: branches/arwinss/reactos/subsystems/win32/win32k/include/xlateobj.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/include/xlateobj.h [iso-8859-1]
(original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/include/xlateobj.h [iso-8859-1] Thu
Jul 30 20:52:03 2009
@@ -29,4 +29,7 @@
VOID FASTCALL
EngDeleteXlate(XLATEOBJ *XlateObj);
+XLATEOBJ* FASTCALL
+IntCreateXlateForBlt(PDC pDCDest, PDC pDCSrc, SURFACE* psurfDest, SURFACE* psurfSrc);
+
#endif