Author: fireball
Date: Thu Aug 13 12:35:29 2009
New Revision: 42652
URL:
http://svn.reactos.org/svn/reactos?rev=42652&view=rev
Log:
- Add GreCopyBits function for copying bitmap bits, and use it inside graphics engine. The
function is a simple wrapper around EngCopyBits but with mouse cursor safety functions (if
it actually gives a visible benefit, if any).
Modified:
branches/arwinss/reactos/subsystems/win32/win32k/gre/bitblt.c
branches/arwinss/reactos/subsystems/win32/win32k/gre/cursoricon.c
branches/arwinss/reactos/subsystems/win32/win32k/gre/surfobj.c
branches/arwinss/reactos/subsystems/win32/win32k/include/gre.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 Aug 13
12:35:29 2009
@@ -563,7 +563,7 @@
DestRect.right = SourceSize.cx;
DestRect.bottom = DestRect.top + ScanLines;
- copyBitsResult = EngCopyBits(DestSurf, SourceSurf, NULL, XlateObj, &DestRect,
&ZeroPoint);
+ copyBitsResult = GreCopyBits(DestSurf, SourceSurf, NULL, XlateObj, &DestRect,
&ZeroPoint);
// If it succeeded, return number of scanlines copies
if (copyBitsResult == TRUE)
@@ -934,7 +934,7 @@
DestSurfObj = EngLockSurface((HSURF)hDestBitmap);
- if (EngCopyBits(DestSurfObj,
+ if (GreCopyBits(DestSurfObj,
&psurf->SurfObj,
NULL,
XlateObj,
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gre/cursoricon.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gre/cursoricon.c [iso-8859-1] Thu Aug
13 12:35:29 2009
@@ -176,7 +176,7 @@
return FALSE;
}
soMask = EngLockSurface((HSURF)hMask);
- EngCopyBits(soMask, MaskBmpObj, NULL, NULL,
+ GreCopyBits(soMask, MaskBmpObj, NULL, NULL,
&DestRect, &SourcePoint);
EngUnlockSurface(MaskBmpObj);
}
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/surfobj.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gre/surfobj.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gre/surfobj.c [iso-8859-1] Thu Aug 13
12:35:29 2009
@@ -339,3 +339,31 @@
/* Restore the old brush */
pDC->pFillBrush = pOldBrush;
}
+
+BOOL
+APIENTRY
+GreCopyBits(SURFOBJ *psoDest,
+ SURFOBJ *psoSource,
+ CLIPOBJ *pco,
+ XLATEOBJ *pxlo,
+ RECTL *prclDest,
+ POINTL *ptlSource)
+{
+ BOOL bResult;
+
+ /* Start mouse safety */
+ MouseSafetyOnDrawStart(psoSource, ptlSource->x, ptlSource->y,
+ (ptlSource->x + abs(prclDest->right -
prclDest->left)),
+ (ptlSource->y + abs(prclDest->bottom -
prclDest->top)));
+
+ MouseSafetyOnDrawStart(psoDest, prclDest->left, prclDest->top,
prclDest->right, prclDest->bottom);
+
+ /* Copy bits using Eng function */
+ bResult = EngCopyBits(psoDest, psoSource, pco, pxlo, prclDest, ptlSource);
+
+ /* Finish mouse safety */
+ MouseSafetyOnDrawEnd(psoDest);
+ MouseSafetyOnDrawEnd(psoSource);
+
+ return bResult;
+}
Modified: branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h [iso-8859-1]
(original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h [iso-8859-1] Thu Aug 13
12:35:29 2009
@@ -188,6 +188,15 @@
UINT y,
COLORREF crColor);
+BOOL
+APIENTRY
+GreCopyBits(
+ SURFOBJ *psoDest,
+ SURFOBJ *psoSource,
+ CLIPOBJ *Clip,
+ XLATEOBJ *ColorTranslation,
+ RECTL *DestRect,
+ POINTL *SourcePoint);
/* Private Eng functions */
BOOL APIENTRY