mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[WIN32K]
Pass EBRUSHOBJ to IntPatBlt instead of the BRUSH. This way we can use the DC's eboFill, instead of initializing a new EBRUSHOBJ. svn path=/trunk/; revision=56427
This commit is contained in:
parent
9a9ec7bb7c
commit
416711ec61
1 changed files with 16 additions and 26 deletions
|
@ -733,15 +733,15 @@ IntPatBlt(
|
||||||
INT Width,
|
INT Width,
|
||||||
INT Height,
|
INT Height,
|
||||||
DWORD dwRop,
|
DWORD dwRop,
|
||||||
PBRUSH pbrush)
|
PEBRUSHOBJ pebo)
|
||||||
{
|
{
|
||||||
RECTL DestRect;
|
RECTL DestRect;
|
||||||
SURFACE *psurf;
|
SURFACE *psurf;
|
||||||
EBRUSHOBJ eboFill ;
|
|
||||||
POINTL BrushOrigin;
|
POINTL BrushOrigin;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
PBRUSH pbrush = pebo->pbrush;
|
||||||
|
|
||||||
ASSERT(pbrush);
|
ASSERT(pebo);
|
||||||
|
|
||||||
FIXUP_ROP(dwRop);
|
FIXUP_ROP(dwRop);
|
||||||
|
|
||||||
|
@ -790,11 +790,6 @@ IntPatBlt(
|
||||||
|
|
||||||
psurf = pdc->dclevel.pSurface;
|
psurf = pdc->dclevel.pSurface;
|
||||||
|
|
||||||
if (pdc->pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
|
|
||||||
DC_vUpdateFillBrush(pdc);
|
|
||||||
|
|
||||||
EBRUSHOBJ_vInit(&eboFill, pbrush, pdc);
|
|
||||||
|
|
||||||
ret = IntEngBitBlt(
|
ret = IntEngBitBlt(
|
||||||
&psurf->SurfObj,
|
&psurf->SurfObj,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -804,14 +799,12 @@ IntPatBlt(
|
||||||
&DestRect,
|
&DestRect,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&eboFill.BrushObject,
|
&pebo->BrushObject,
|
||||||
&BrushOrigin,
|
&BrushOrigin,
|
||||||
ROP_TO_ROP4(dwRop));
|
ROP_TO_ROP4(dwRop));
|
||||||
|
|
||||||
DC_vFinishBlit(pdc, NULL);
|
DC_vFinishBlit(pdc, NULL);
|
||||||
|
|
||||||
EBRUSHOBJ_vCleanup(&eboFill);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -826,6 +819,7 @@ IntGdiPolyPatBlt(
|
||||||
INT i;
|
INT i;
|
||||||
PBRUSH pbrush;
|
PBRUSH pbrush;
|
||||||
PDC pdc;
|
PDC pdc;
|
||||||
|
EBRUSHOBJ eboFill;
|
||||||
|
|
||||||
pdc = DC_LockDc(hDC);
|
pdc = DC_LockDc(hDC);
|
||||||
if (!pdc)
|
if (!pdc)
|
||||||
|
@ -844,8 +838,13 @@ IntGdiPolyPatBlt(
|
||||||
for (i = 0; i < cRects; i++)
|
for (i = 0; i < cRects; i++)
|
||||||
{
|
{
|
||||||
pbrush = BRUSH_ShareLockBrush(pRects->hBrush);
|
pbrush = BRUSH_ShareLockBrush(pRects->hBrush);
|
||||||
if(pbrush != NULL)
|
|
||||||
|
/* Check if we could lock the brush */
|
||||||
|
if (pbrush != NULL)
|
||||||
{
|
{
|
||||||
|
/* Initialize a brush object */
|
||||||
|
EBRUSHOBJ_vInit(&eboFill, pbrush, pdc);
|
||||||
|
|
||||||
IntPatBlt(
|
IntPatBlt(
|
||||||
pdc,
|
pdc,
|
||||||
pRects->r.left,
|
pRects->r.left,
|
||||||
|
@ -853,7 +852,10 @@ IntGdiPolyPatBlt(
|
||||||
pRects->r.right,
|
pRects->r.right,
|
||||||
pRects->r.bottom,
|
pRects->r.bottom,
|
||||||
dwRop,
|
dwRop,
|
||||||
pbrush);
|
&eboFill);
|
||||||
|
|
||||||
|
/* Cleanup the brush object and unlock the brush */
|
||||||
|
EBRUSHOBJ_vCleanup(&eboFill);
|
||||||
BRUSH_ShareUnlockBrush(pbrush);
|
BRUSH_ShareUnlockBrush(pbrush);
|
||||||
}
|
}
|
||||||
pRects++;
|
pRects++;
|
||||||
|
@ -873,7 +875,6 @@ NtGdiPatBlt(
|
||||||
INT Height,
|
INT Height,
|
||||||
DWORD ROP)
|
DWORD ROP)
|
||||||
{
|
{
|
||||||
PBRUSH pbrush;
|
|
||||||
DC *dc;
|
DC *dc;
|
||||||
PDC_ATTR pdcattr;
|
PDC_ATTR pdcattr;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
@ -885,8 +886,6 @@ NtGdiPatBlt(
|
||||||
return NtGdiMaskBlt(hDC, XLeft, YLeft, Width, Height, 0,0,0,0,0,0,ROP,0);
|
return NtGdiMaskBlt(hDC, XLeft, YLeft, Width, Height, 0,0,0,0,0,0,ROP,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((XLeft == 0) && (YLeft == 0) && (Width == 592) && (Height == 362)) __debugbreak();
|
|
||||||
|
|
||||||
dc = DC_LockDc(hDC);
|
dc = DC_LockDc(hDC);
|
||||||
if (dc == NULL)
|
if (dc == NULL)
|
||||||
{
|
{
|
||||||
|
@ -906,17 +905,8 @@ if ((XLeft == 0) && (YLeft == 0) && (Width == 592) && (Height == 362)) __debugbr
|
||||||
if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
|
if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
|
||||||
DC_vUpdateFillBrush(dc);
|
DC_vUpdateFillBrush(dc);
|
||||||
|
|
||||||
pbrush = BRUSH_ShareLockBrush(pdcattr->hbrush);
|
ret = IntPatBlt(dc, XLeft, YLeft, Width, Height, ROP, &dc->eboFill);
|
||||||
if (pbrush == NULL)
|
|
||||||
{
|
|
||||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
|
||||||
DC_UnlockDc(dc);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = IntPatBlt(dc, XLeft, YLeft, Width, Height, ROP, pbrush);
|
|
||||||
|
|
||||||
BRUSH_ShareUnlockBrush(pbrush);
|
|
||||||
DC_UnlockDc(dc);
|
DC_UnlockDc(dc);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue