Author: tkreuzer
Date: Sat Mar 21 02:40:59 2009
New Revision: 40145
URL:
http://svn.reactos.org/svn/reactos?rev=40145&view=rev
Log:
Rename IntGdiInitBrushInstance to EBRUSHOBJ_vInit and move it to engbrush.c. Add 2 FIXME
comments.
Modified:
trunk/reactos/subsystems/win32/win32k/eng/engbrush.c
trunk/reactos/subsystems/win32/win32k/include/intgdi.h
trunk/reactos/subsystems/win32/win32k/objects/arc.c
trunk/reactos/subsystems/win32/win32k/objects/bitblt.c
trunk/reactos/subsystems/win32/win32k/objects/brush.c
trunk/reactos/subsystems/win32/win32k/objects/drawing.c
trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
trunk/reactos/subsystems/win32/win32k/objects/freetype.c
trunk/reactos/subsystems/win32/win32k/objects/line.c
trunk/reactos/subsystems/win32/win32k/objects/region.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/engbrush.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/engbrush.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/engbrush.c [iso-8859-1] Sat Mar 21 02:40:59
2009
@@ -1,27 +1,8 @@
-/*
- * ReactOS W32 Subsystem
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: GDI Driver Brush Functions
- * FILE: subsys/win32k/eng/brush.c
+ * FILE: subsystem/win32/win32k/eng/engbrush.c
* PROGRAMER: Jason Filby
* REVISION HISTORY:
* 3/7/1999: Created
@@ -31,6 +12,37 @@
#define NDEBUG
#include <debug.h>
+
+/** Internal functions ********************************************************/
+
+VOID FASTCALL
+EBRUSHOBJ_vInit(EBRUSHOBJ *pebo, PBRUSH pbrush, XLATEOBJ *pxlo)
+{
+ ASSERT(pebo);
+ ASSERT(pbrush);
+
+ if (pbrush->flAttrs & GDIBRUSH_IS_NULL)
+ {
+ pebo->BrushObject.iSolidColor = 0;
+ }
+ else if (pbrush->flAttrs & GDIBRUSH_IS_SOLID)
+ {
+ pebo->BrushObject.iSolidColor = XLATEOBJ_iXlate(pxlo,
pbrush->BrushAttr.lbColor);
+ }
+ else
+ {
+ pebo->BrushObject.iSolidColor = 0xFFFFFFFF;
+ // FIXME: What about calling DrvRealizeBrush?
+ }
+
+ pebo->BrushObject.pvRbrush = pbrush->ulRealization;
+ pebo->BrushObject.flColorType = 0;
+ pebo->GdiBrushObject = pbrush;
+ pebo->XlateObject = pxlo;
+}
+
+
+/** Exported DDI functions ****************************************************/
/*
* @implemented
@@ -49,6 +61,7 @@
PVOID APIENTRY
BRUSHOBJ_pvGetRbrush(IN BRUSHOBJ *BrushObj)
{
+ // FIXME: this is wrong! Read msdn.
return(BrushObj->pvRbrush);
}
Modified: trunk/reactos/subsystems/win32/win32k/include/intgdi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/intgdi.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/intgdi.h [iso-8859-1] Sat Mar 21
02:40:59 2009
@@ -14,9 +14,6 @@
XLATEOBJ*
FASTCALL
IntCreateXlateForBlt(PDC pDCDest, PDC pDCSrc, SURFACE* pDestSurf, SURFACE* pSrcSurf);
-
-VOID FASTCALL
-IntGdiInitBrushInstance(EBRUSHOBJ *BrushInst, PBRUSH BrushObj, XLATEOBJ *XlateObj);
HBRUSH APIENTRY
IntGdiCreateDIBBrush(
Modified: trunk/reactos/subsystems/win32/win32k/objects/arc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/arc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/arc.c [iso-8859-1] Sat Mar 21 02:40:59
2009
@@ -166,7 +166,7 @@
return FALSE;
}
- IntGdiInitBrushInstance(&eboPen, pbrushPen, dc->rosdc.XlatePen);
+ EBRUSHOBJ_vInit(&eboPen, pbrushPen, dc->rosdc.XlatePen);
if (arctype == GdiTypePie)
{
Modified: trunk/reactos/subsystems/win32/win32k/objects/bitblt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] Sat Mar 21
02:40:59 2009
@@ -292,7 +292,7 @@
goto cleanup;
}
BrushOrigin = *((PPOINTL)&pbrush->ptOrigin);
- IntGdiInitBrushInstance(&BrushInst, pbrush, DCDest->rosdc.XlateBrush);
+ EBRUSHOBJ_vInit(&BrushInst, pbrush, DCDest->rosdc.XlateBrush);
}
/* Create the XLATEOBJ. */
@@ -874,7 +874,7 @@
goto failed;
}
BrushOrigin = *((PPOINTL)&pbrush->ptOrigin);
- IntGdiInitBrushInstance(&BrushInst, pbrush, DCDest->rosdc.XlateBrush);
+ EBRUSHOBJ_vInit(&BrushInst, pbrush, DCDest->rosdc.XlateBrush);
}
/* Offset the brush */
@@ -968,7 +968,7 @@
BrushOrigin.x = BrushObj->ptOrigin.x + dc->ptlDCOrig.x;
BrushOrigin.y = BrushObj->ptOrigin.y + dc->ptlDCOrig.y;
- IntGdiInitBrushInstance(&eboFill, BrushObj, dc->rosdc.XlateBrush);
+ EBRUSHOBJ_vInit(&eboFill, BrushObj, dc->rosdc.XlateBrush);
ret = IntEngBitBlt(
&psurf->SurfObj,
Modified: trunk/reactos/subsystems/win32/win32k/objects/brush.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/brush.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/brush.c [iso-8859-1] Sat Mar 21 02:40:59
2009
@@ -164,30 +164,6 @@
}
return Result;
-}
-
-VOID FASTCALL
-IntGdiInitBrushInstance(EBRUSHOBJ *BrushInst, PBRUSH pbrush, XLATEOBJ *XlateObj)
-{
- ASSERT(BrushInst);
- ASSERT(pbrush);
- if (pbrush->flAttrs & GDIBRUSH_IS_NULL)
- {
- BrushInst->BrushObject.iSolidColor = 0;
- }
- else if (pbrush->flAttrs & GDIBRUSH_IS_SOLID)
- {
- BrushInst->BrushObject.iSolidColor = XLATEOBJ_iXlate(XlateObj,
pbrush->BrushAttr.lbColor);
- }
- else
- {
- BrushInst->BrushObject.iSolidColor = 0xFFFFFFFF;
- }
-
- BrushInst->BrushObject.pvRbrush = pbrush->ulRealization;
- BrushInst->BrushObject.flColorType = 0;
- BrushInst->GdiBrushObject = pbrush;
- BrushInst->XlateObject = XlateObj;
}
/**
Modified: trunk/reactos/subsystems/win32/win32k/objects/drawing.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/drawing.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/drawing.c [iso-8859-1] Sat Mar 21
02:40:59 2009
@@ -1237,9 +1237,9 @@
ROP = PATCOPY;
if (Pen)
- IntGdiInitBrushInstance(&eboFill, pbrush, dc->rosdc.XlatePen);
+ EBRUSHOBJ_vInit(&eboFill, pbrush, dc->rosdc.XlatePen);
else
- IntGdiInitBrushInstance(&eboFill, pbrush, dc->rosdc.XlateBrush);
+ EBRUSHOBJ_vInit(&eboFill, pbrush, dc->rosdc.XlateBrush);
Ret = IntEngBitBlt(
&psurf->SurfObj,
Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] Sat Mar 21
02:40:59 2009
@@ -107,7 +107,7 @@
BrushOrigin = *((PPOINTL)&pbrushFill->ptOrigin);
BrushOrigin.x += dc->ptlDCOrig.x;
BrushOrigin.y += dc->ptlDCOrig.y;
- IntGdiInitBrushInstance(&eboFill, pbrushFill, dc->rosdc.XlateBrush);
+ EBRUSHOBJ_vInit(&eboFill, pbrushFill, dc->rosdc.XlateBrush);
ret = IntFillPolygon (dc, psurf, &eboFill.BrushObject, Points, Count,
DestRect, &BrushOrigin);
}
@@ -119,7 +119,7 @@
{
int i;
- IntGdiInitBrushInstance(&eboLine, pbrushLine, dc->rosdc.XlatePen);
+ EBRUSHOBJ_vInit(&eboLine, pbrushLine, dc->rosdc.XlatePen);
for (i = 0; i < Count-1; i++)
{
@@ -600,7 +600,7 @@
BrushOrigin = *((PPOINTL)&pbrushFill->ptOrigin);
BrushOrigin.x += dc->ptlDCOrig.x;
BrushOrigin.y += dc->ptlDCOrig.y;
- IntGdiInitBrushInstance(&eboFill, pbrushFill, dc->rosdc.XlateBrush);
+ EBRUSHOBJ_vInit(&eboFill, pbrushFill, dc->rosdc.XlateBrush);
ret = IntEngBitBlt(&psurf->SurfObj,
NULL,
NULL,
@@ -615,7 +615,7 @@
}
}
- IntGdiInitBrushInstance(&eboLine, pbrushLine, dc->rosdc.XlatePen);
+ EBRUSHOBJ_vInit(&eboLine, pbrushLine, dc->rosdc.XlatePen);
// Draw the rectangle with the current pen
@@ -1147,7 +1147,7 @@
BrushOrigin = *((PPOINTL)&pbrushFill->ptOrigin);
BrushOrigin.x += dc->ptlDCOrig.x;
BrushOrigin.y += dc->ptlDCOrig.y;
- IntGdiInitBrushInstance(&eboFill, pbrushFill, dc->rosdc.XlateBrush);
+ EBRUSHOBJ_vInit(&eboFill, pbrushFill, dc->rosdc.XlateBrush);
Ret = IntEngBitBlt(&psurf->SurfObj, NULL, NULL,
dc->rosdc.CombinedClip, NULL,
&DestRect, NULL, NULL,
Modified: trunk/reactos/subsystems/win32/win32k/objects/freetype.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] Sat Mar 21
02:40:59 2009
@@ -3237,7 +3237,7 @@
{
goto fail;
}
- IntGdiInitBrushInstance(&eboText, pbrushText, NULL);
+ EBRUSHOBJ_vInit(&eboText, pbrushText, NULL);
if ((fuOptions & ETO_OPAQUE) || pdcattr->jBkMode == OPAQUE)
{
hbrushBackGnd = NtGdiCreateSolidBrush(XLATEOBJ_iXlate(XlateObj,
pdcattr->crBackgroundClr), 0);
@@ -3250,7 +3250,7 @@
{
goto fail;
}
- IntGdiInitBrushInstance(&eboBackGnd, pbrushBackGnd, NULL);
+ EBRUSHOBJ_vInit(&eboBackGnd, pbrushBackGnd, NULL);
}
XlateObj2 = (XLATEOBJ*)IntEngCreateXlate(PAL_RGB, Mode, NULL, hDestPalette);
if ( !XlateObj2 )
Modified: trunk/reactos/subsystems/win32/win32k/objects/line.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/line.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/line.c [iso-8859-1] Sat Mar 21 02:40:59
2009
@@ -154,7 +154,7 @@
if (!(pbrushLine->flAttrs & GDIBRUSH_IS_NULL))
{
- IntGdiInitBrushInstance(&eboLine, pbrushLine, dc->rosdc.XlatePen);
+ EBRUSHOBJ_vInit(&eboLine, pbrushLine, dc->rosdc.XlatePen);
Ret = IntEngLineTo(&psurf->SurfObj,
dc->rosdc.CombinedClip,
&eboLine.BrushObject,
@@ -292,7 +292,7 @@
Points[i].y += dc->ptlDCOrig.y;
}
- IntGdiInitBrushInstance(&eboLine, pbrushLine, dc->rosdc.XlatePen);
+ EBRUSHOBJ_vInit(&eboLine, pbrushLine, dc->rosdc.XlatePen);
Ret = IntEngPolyline(&psurf->SurfObj,
dc->rosdc.CombinedClip,
&eboLine.BrushObject,
Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] Sat Mar 21
02:40:59 2009
@@ -2937,7 +2937,7 @@
ASSERT(ClipRegion);
pbrush = BRUSH_LockBrush(pdcattr->hbrush);
ASSERT(pbrush);
- IntGdiInitBrushInstance(&eboFill, pbrush, dc->rosdc.XlateBrush);
+ EBRUSHOBJ_vInit(&eboFill, pbrush, dc->rosdc.XlateBrush);
BrushOrigin.x = pdcattr->ptlBrushOrigin.x;
BrushOrigin.y = pdcattr->ptlBrushOrigin.y;