Author: fireball
Date: Wed Jul 29 15:32:00 2009
New Revision: 42285
URL:
http://svn.reactos.org/svn/reactos?rev=42285&view=rev
Log:
- Uncomment mouse safety code in BitBlt (it doesn't do anything since it's stubbed
anyway).
- Add GreCreateNullBrush for creating NULL brushes.
- Allocate/free surface objects using Eng routines using TAG_SURFOBJ.
Modified:
branches/arwinss/reactos/subsystems/win32/win32k/gre/bitblt.c
branches/arwinss/reactos/subsystems/win32/win32k/gre/brushobj.c
branches/arwinss/reactos/subsystems/win32/win32k/gre/surfobj.c
branches/arwinss/reactos/subsystems/win32/win32k/include/brushobj.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] Wed Jul 29
15:32:00 2009
@@ -80,7 +80,6 @@
if (bRemoveMouse)
{
-#if 0
SURFACE_LockBitmapBits(psurfTrg);
if (psoSrc)
@@ -94,7 +93,6 @@
}
MouseSafetyOnDrawStart(psoTrg, rclClipped.left, rclClipped.top,
rclClipped.right, rclClipped.bottom);
-#endif
}
/* Is the target surface device managed? */
@@ -113,6 +111,7 @@
/* Is the source surface device managed? */
else if (psoSrc && psurfSrc->flHooks & HOOK_BITBLT)
{
+ DPRINT1("psoSrc %p\n", psoSrc);
pfnBitBlt = GDIDEVFUNCS(psoSrc).BitBlt;
}
else
@@ -132,7 +131,6 @@
pptlBrush,
rop4);
-#if 0
if (bRemoveMouse)
{
MouseSafetyOnDrawEnd(psoTrg);
@@ -147,7 +145,6 @@
SURFACE_UnlockBitmapBits(psurfTrg);
}
-#endif
return bResult;
}
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/brushobj.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gre/brushobj.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gre/brushobj.c [iso-8859-1] Wed Jul
29 15:32:00 2009
@@ -139,6 +139,24 @@
PBRUSHGDI
NTAPI
+GreCreateNullBrush()
+{
+ PBRUSHGDI pBrush;
+
+ /* Allocate memory for the object */
+ pBrush = EngAllocMem(FL_ZERO_MEMORY, sizeof(BRUSHGDI), TAG_BRUSHOBJ);
+ if (!pBrush) return NULL;
+
+ /* Set NULL flag */
+ pBrush->flAttrs |= GDIBRUSH_IS_NULL;
+
+ /* Return newly created brush */
+ return pBrush;
+}
+
+
+PBRUSHGDI
+NTAPI
GreCreateSolidBrush(COLORREF crColor)
{
PBRUSHGDI pBrush;
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] Wed Jul 29
15:32:00 2009
@@ -136,11 +136,8 @@
return 0;
/* Allocate storage for surface object */
- pSurface = ExAllocatePool(PagedPool, sizeof(SURFACE));
+ pSurface = EngAllocMem(FL_ZERO_MEMORY, sizeof(SURFACE), TAG_SURFOBJ);
if (!pSurface) return NULL;
-
- /* Zero it */
- RtlZeroMemory(pSurface, sizeof(SURFACE));
/* Create a handle for it */
hSurface = alloc_gdi_handle(&pSurface->BaseObject,
(SHORT)GDI_OBJECT_TYPE_BITMAP);
@@ -222,7 +219,7 @@
pSurf = free_gdi_handle(hBitmap);
/* Free its storage */
- ExFreePool(pSurf);
+ EngFreeMem(pSurf);
}
LONG FASTCALL
Modified: branches/arwinss/reactos/subsystems/win32/win32k/include/brushobj.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/include/brushobj.h [iso-8859-1]
(original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/include/brushobj.h [iso-8859-1] Wed
Jul 29 15:32:00 2009
@@ -55,6 +55,9 @@
PBRUSHGDI NTAPI
GreCreatePatternBrush(PSURFACE pSurface);
+PBRUSHGDI NTAPI
+GreCreateNullBrush();
+
VOID NTAPI
GreFreeBrush(PBRUSHGDI pBrush);