Author: tkreuzer
Date: Thu Dec 18 08:12:01 2014
New Revision: 65727
URL:
http://svn.reactos.org/svn/reactos?rev=65727&view=rev
Log:
[WIN32K]
- Move IntGdiReleaseRaoRgn and IntGdiReleaseVisRgn to cliprgn.c
- Remove unused IntUpdateVisRectRgn
Modified:
trunk/reactos/win32ss/gdi/ntgdi/cliprgn.c
trunk/reactos/win32ss/gdi/ntgdi/cliprgn.h
trunk/reactos/win32ss/gdi/ntgdi/region.c
trunk/reactos/win32ss/gdi/ntgdi/region.h
Modified: trunk/reactos/win32ss/gdi/ntgdi/cliprgn.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/cliprgn.…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/cliprgn.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/cliprgn.c [iso-8859-1] Thu Dec 18 08:12:01 2014
@@ -10,6 +10,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
Modified: trunk/reactos/win32ss/gdi/ntgdi/cliprgn.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/cliprgn.…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/cliprgn.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/cliprgn.h [iso-8859-1] Thu Dec 18 08:12:01 2014
@@ -9,3 +9,5 @@
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);
Modified: trunk/reactos/win32ss/gdi/ntgdi/region.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/region.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/region.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/region.c [iso-8859-1] Thu Dec 18 08:12:01 2014
@@ -2264,70 +2264,6 @@
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 @@
ULONG i;
BOOL bRet = FALSE;
+ /// FIXME: need to use GDIOBJ_LockMultipleObjects
+
rgn1 = RGNOBJAPI_Lock(hSrcRgn1, NULL);
if (rgn1 == NULL)
return ERROR;
Modified: trunk/reactos/win32ss/gdi/ntgdi/region.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/region.h…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/region.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/region.h [iso-8859-1] Thu Dec 18 08:12:01 2014
@@ -8,14 +8,18 @@
{
/* 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 @@
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 @@
{
GDIOBJ_vUnlockObject(&prgn->BaseObject);
}
+
+// FIXME: move this
+BOOL FASTCALL IntGdiPaintRgn(PDC, PREGION );