- Move IntGdiReleaseRaoRgn and IntGdiReleaseVisRgn to cliprgn.c
- Remove unused IntUpdateVisRectRgn

svn path=/trunk/; revision=65727
This commit is contained in:
Timo Kreuzer 2014-12-18 08:12:01 +00:00
parent e6d7e74e6a
commit 095f2182e8
4 changed files with 39 additions and 74 deletions

View file

@ -11,6 +11,32 @@
#define NDEBUG
#include <debug.h>
VOID
FASTCALL
IntGdiReleaseRaoRgn(PDC pDC)
{
INT Index = GDI_HANDLE_GET_INDEX(pDC->BaseObject.hHmgr);
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
pDC->fs |= DC_FLAG_DIRTY_RAO;
Entry->Flags |= GDI_ENTRY_VALIDATE_VIS;
RECTL_vSetEmptyRect(&pDC->erclClip);
REGION_Delete(pDC->prgnRao);
pDC->prgnRao = NULL;
}
VOID
FASTCALL
IntGdiReleaseVisRgn(PDC pDC)
{
INT Index = GDI_HANDLE_GET_INDEX(pDC->BaseObject.hHmgr);
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
pDC->fs |= DC_FLAG_DIRTY_RAO;
Entry->Flags |= GDI_ENTRY_VALIDATE_VIS;
RECTL_vSetEmptyRect(&pDC->erclClip);
REGION_Delete(pDC->prgnVis);
pDC->prgnVis = prgnDefault;
}
VOID
FASTCALL
GdiSelectVisRgn(

View file

@ -9,3 +9,5 @@ GdiGetClipBox(
VOID FASTCALL GdiSelectVisRgn(HDC hdc, PREGION prgn);
INT FASTCALL IntGdiExtSelectClipRgn (PDC dc, PREGION prgn, int fnMode);
VOID FASTCALL CLIPPING_UpdateGCRegion(DC* Dc);
VOID FASTCALL IntGdiReleaseRaoRgn(PDC);
VOID FASTCALL IntGdiReleaseVisRgn(PDC);

View file

@ -2264,70 +2264,6 @@ REGION_Delete(PREGION pRgn)
GDIOBJ_vDeleteObject(&pRgn->BaseObject);
}
VOID
FASTCALL
IntGdiReleaseRaoRgn(PDC pDC)
{
INT Index = GDI_HANDLE_GET_INDEX(pDC->BaseObject.hHmgr);
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
pDC->fs |= DC_FLAG_DIRTY_RAO;
Entry->Flags |= GDI_ENTRY_VALIDATE_VIS;
RECTL_vSetEmptyRect(&pDC->erclClip);
REGION_Delete(pDC->prgnRao);
pDC->prgnRao = NULL;
}
VOID
FASTCALL
IntGdiReleaseVisRgn(PDC pDC)
{
INT Index = GDI_HANDLE_GET_INDEX(pDC->BaseObject.hHmgr);
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
pDC->fs |= DC_FLAG_DIRTY_RAO;
Entry->Flags |= GDI_ENTRY_VALIDATE_VIS;
RECTL_vSetEmptyRect(&pDC->erclClip);
REGION_Delete(pDC->prgnVis);
pDC->prgnVis = prgnDefault;
}
VOID
FASTCALL
IntUpdateVisRectRgn(PDC pDC, PREGION pRgn)
{
INT Index = GDI_HANDLE_GET_INDEX(pDC->BaseObject.hHmgr);
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
PDC_ATTR pdcattr;
RECTL rcl;
if (Entry->Flags & GDI_ENTRY_VALIDATE_VIS)
{
pdcattr = pDC->pdcattr;
pdcattr->VisRectRegion.iComplexity = REGION_Complexity(pRgn);
if (pRgn && pdcattr->VisRectRegion.iComplexity != NULLREGION)
{
rcl.left = pRgn->rdh.rcBound.left;
rcl.top = pRgn->rdh.rcBound.top;
rcl.right = pRgn->rdh.rcBound.right;
rcl.bottom = pRgn->rdh.rcBound.bottom;
rcl.left -= pDC->erclWindow.left;
rcl.top -= pDC->erclWindow.top;
rcl.right -= pDC->erclWindow.left;
rcl.bottom -= pDC->erclWindow.top;
}
else
{
RECTL_vSetEmptyRect(&rcl);
}
pdcattr->VisRectRegion.Rect = rcl;
Entry->Flags &= ~GDI_ENTRY_VALIDATE_VIS;
}
}
BOOL
FASTCALL
IntGdiSetRegionOwner(HRGN hRgn, DWORD OwnerMask)
@ -3617,6 +3553,8 @@ NtGdiEqualRgn(
ULONG i;
BOOL bRet = FALSE;
/// FIXME: need to use GDIOBJ_LockMultipleObjects
rgn1 = RGNOBJAPI_Lock(hSrcRgn1, NULL);
if (rgn1 == NULL)
return ERROR;

View file

@ -8,14 +8,18 @@ typedef struct _REGION
{
/* Header for all gdi objects in the handle table.
Do not (re)move this. */
BASEOBJECT BaseObject;
BASEOBJECT BaseObject;
PRGN_ATTR prgnattr;
RGN_ATTR rgnattr;
RGNDATAHEADER rdh;
RECTL *Buffer;
RECTL *Buffer;
} REGION, *PREGION;
/* Globals ********************************************************************/
extern PREGION prgnDefault;
extern HRGN hrgnDefault;
/* Functions ******************************************************************/
@ -32,16 +36,8 @@ BOOL FASTCALL REGION_PtInRegion(PREGION, INT, INT);
INT FASTCALL REGION_CropRegion(PREGION rgnDst, PREGION rgnSrc, const RECTL *rect);
VOID FASTCALL REGION_SetRectRgn(PREGION pRgn, INT LeftRect, INT TopRect, INT RightRect, INT BottomRect);
VOID NTAPI REGION_vCleanup(PVOID ObjectBody);
extern PREGION prgnDefault;
extern HRGN hrgnDefault;
VOID FASTCALL REGION_Delete(PREGION);
VOID FASTCALL IntGdiReleaseRaoRgn(PDC);
VOID FASTCALL IntGdiReleaseVisRgn(PDC);
INT APIENTRY IntGdiGetRgnBox(HRGN, RECTL*);
BOOL FASTCALL IntGdiPaintRgn(PDC, PREGION );
BOOL
FASTCALL
@ -97,3 +93,6 @@ REGION_UnlockRgn(PREGION prgn)
{
GDIOBJ_vUnlockObject(&prgn->BaseObject);
}
// FIXME: move this
BOOL FASTCALL IntGdiPaintRgn(PDC, PREGION );