mirror of
https://github.com/reactos/reactos.git
synced 2024-07-05 12:15:46 +00:00
[WIN32K]
- update clipping, GraphicCaps, brush, pen, background and charset of the DC after a mode change svn path=/branches/reactos-yarotows/; revision=46952
This commit is contained in:
parent
202a5fc5c7
commit
b1f448326a
|
@ -453,6 +453,34 @@ leave:
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int FASTCALL
|
||||
CLIPPING_UpdateGCRegion(DC* Dc);
|
||||
|
||||
static
|
||||
void
|
||||
DC_vUpdateDC(PDC pdc)
|
||||
{
|
||||
HRGN hVisRgn ;
|
||||
PPDEVOBJ ppdev = pdc->ppdev ;
|
||||
|
||||
pdc->dhpdev = ppdev->dhpdev;
|
||||
|
||||
SURFACE_ShareUnlockSurface(pdc->dclevel.pSurface);
|
||||
pdc->dclevel.pSurface = PDEVOBJ_pSurface(ppdev);
|
||||
|
||||
PDEVOBJ_sizl(pdc->ppdev, &pdc->dclevel.sizl);
|
||||
hVisRgn = NtGdiCreateRectRgn(0, 0, pdc->dclevel.sizl.cx, pdc->dclevel.sizl.cy);
|
||||
ASSERT(hVisRgn);
|
||||
GdiSelectVisRgn(pdc->BaseObject.hHmgr, hVisRgn);
|
||||
GreDeleteObject(hVisRgn);
|
||||
|
||||
pdc->flGraphicsCaps = ppdev->devinfo.flGraphicsCaps;
|
||||
pdc->flGraphicsCaps2 = ppdev->devinfo.flGraphicsCaps2;
|
||||
|
||||
pdc->pdcattr->ulDirty_ |= DIRTY_DEFAULT;
|
||||
}
|
||||
|
||||
/* Prepare a blit for up to 2 DCs */
|
||||
/* rc1 and rc2 are the rectangles where we want to draw or
|
||||
* from where we take pixels. */
|
||||
|
@ -501,8 +529,7 @@ DC_vPrepareDCsForBlit(PDC pdc1,
|
|||
/* Update surface if needed */
|
||||
if(pdcFirst->ppdev->pSurface != pdcFirst->dclevel.pSurface)
|
||||
{
|
||||
SURFACE_ShareUnlockSurface(pdcFirst->dclevel.pSurface);
|
||||
pdcFirst->dclevel.pSurface = PDEVOBJ_pSurface(pdcFirst->ppdev);
|
||||
DC_vUpdateDC(pdcFirst);
|
||||
}
|
||||
}
|
||||
if(pdcSecond && pdcSecond->dctype == DCTYPE_DIRECT)
|
||||
|
@ -516,8 +543,7 @@ DC_vPrepareDCsForBlit(PDC pdc1,
|
|||
/* Update surface if needed */
|
||||
if(pdcSecond->ppdev->pSurface != pdcSecond->dclevel.pSurface)
|
||||
{
|
||||
SURFACE_ShareUnlockSurface(pdcSecond->dclevel.pSurface);
|
||||
pdcSecond->dclevel.pSurface = PDEVOBJ_pSurface(pdcSecond->ppdev);
|
||||
DC_vUpdateDC(pdcSecond);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue