Author: jimtabor Date: Wed Aug 29 02:11:55 2007 New Revision: 28636
URL: http://svn.reactos.org/svn/reactos?rev=28636&view=rev Log: - Removed NtGdiPoly/Polygon from source, w32ksvc.db and updated ntgdibad.h. - Renamed the Nt function to GdiCreatePolyPolygonRgn, it is not safe so it will not be named to IntGdiXxX.
Modified: trunk/reactos/include/reactos/win32k/ntgdibad.h trunk/reactos/subsystems/win32/win32k/include/region.h trunk/reactos/subsystems/win32/win32k/objects/fillshap.c trunk/reactos/subsystems/win32/win32k/objects/region.c trunk/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: trunk/reactos/include/reactos/win32k/ntgdibad.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntgd... ============================================================================== --- trunk/reactos/include/reactos/win32k/ntgdibad.h (original) +++ trunk/reactos/include/reactos/win32k/ntgdibad.h Wed Aug 29 02:11:55 2007 @@ -161,14 +161,6 @@ INT Count, INT PolyFillMode);
-/* Use NtGdiPolyPolyDraw with PolyPolyRgn. */ -HRGN -STDCALL -NtGdiCreatePolyPolygonRgn(CONST PPOINT pt, - CONST PINT PolyCounts, - INT Count, - INT PolyFillMode); - /* Meta are user-mode. */ BOOL STDCALL @@ -505,21 +497,6 @@ STDCALL NtGdiPolyTextOut(HDC hDC, CONST LPPOLYTEXTW txt, - int Count); - -/* Use NtGdiPolyPolyDraw with GdiPolyPolygon. */ -BOOL -STDCALL -NtGdiPolygon(HDC hDC, - CONST PPOINT Points, - int Count); - -/* Use NtGdiPolyPolyDraw with GdiPolyPolygon. */ -BOOL -STDCALL -NtGdiPolyPolygon(HDC hDC, - CONST LPPOINT Points, - CONST LPINT PolyCounts, int Count);
/* Call UserRealizePalette. */
Modified: trunk/reactos/subsystems/win32/win32k/include/region.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/region.h (original) +++ trunk/reactos/subsystems/win32/win32k/include/region.h Wed Aug 29 02:11:55 2007 @@ -18,6 +18,7 @@ BOOL INTERNAL_CALL RGNDATA_Cleanup(PVOID ObjectBody);
BOOL FASTCALL IntGdiPaintRgn(PDC, HRGN ); +HRGN FASTCALL GdiCreatePolyPolygonRgn(CONST PPOINT, CONST PINT, INT, INT );
#endif
Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/fillshap.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/fillshap.c Wed Aug 29 02:11:55 2007 @@ -805,183 +805,6 @@
#endif
-BOOL -STDCALL -NtGdiPolygon(HDC hDC, - CONST PPOINT UnsafePoints, - int Count) -{ - DC *dc; - LPPOINT Safept; - NTSTATUS Status = STATUS_SUCCESS; - BOOL Ret = FALSE; - - if ( Count < 2 ) - { - SetLastWin32Error(ERROR_INVALID_PARAMETER); - return FALSE; - } - - _SEH_TRY - { - ProbeForRead(UnsafePoints, - Count * sizeof(POINT), - 1); - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - - if (!NT_SUCCESS(Status)) - { - SetLastNtError(Status); - return FALSE; - } - - dc = DC_LockDc(hDC); - if(!dc) - SetLastWin32Error(ERROR_INVALID_HANDLE); - else - { - if (dc->IsIC) - { - DC_UnlockDc(dc); - /* Yes, Windows really returns TRUE in this case */ - return TRUE; - } - Safept = ExAllocatePoolWithTag(PagedPool, sizeof(POINT) * Count, TAG_SHAPE); - if(!Safept) - SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); - else - { - _SEH_TRY - { - /* pointer was already probed! */ - RtlCopyMemory(Safept, - UnsafePoints, - Count * sizeof(POINT)); - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - - if(!NT_SUCCESS(Status)) - SetLastNtError(Status); - else - Ret = IntGdiPolygon(dc, Safept, Count); - - ExFreePool(Safept); - } - DC_UnlockDc(dc); - } - - return Ret; -} - - -BOOL -STDCALL -NtGdiPolyPolygon(HDC hDC, - CONST LPPOINT Points, - CONST LPINT PolyCounts, - int Count) -{ - DC *dc; - LPPOINT Safept; - LPINT SafePolyPoints; - NTSTATUS Status = STATUS_SUCCESS; - BOOL Ret; - - dc = DC_LockDc(hDC); - if(!dc) - { - SetLastWin32Error(ERROR_INVALID_HANDLE); - return FALSE; - } - if (dc->IsIC) - { - DC_UnlockDc(dc); - /* Yes, Windows really returns TRUE in this case */ - return TRUE; - } - - if(Count > 0) - { - _SEH_TRY - { - ProbeForRead(Points, - Count * sizeof(POINT), - 1); - ProbeForRead(PolyCounts, - Count * sizeof(INT), - 1); - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - - if (!NT_SUCCESS(Status)) - { - DC_UnlockDc(dc); - SetLastNtError(Status); - return FALSE; - } - - Safept = ExAllocatePoolWithTag(PagedPool, (sizeof(POINT) + sizeof(INT)) * Count, TAG_SHAPE); - if(!Safept) - { - DC_UnlockDc(dc); - SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } - - SafePolyPoints = (LPINT)&Safept[Count]; - - _SEH_TRY - { - /* pointers already probed! */ - RtlCopyMemory(Safept, - Points, - Count * sizeof(POINT)); - RtlCopyMemory(SafePolyPoints, - PolyCounts, - Count * sizeof(INT)); - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - - if(!NT_SUCCESS(Status)) - { - DC_UnlockDc(dc); - ExFreePool(Safept); - SetLastNtError(Status); - return FALSE; - } - } - else - { - DC_UnlockDc(dc); - SetLastWin32Error(ERROR_INVALID_PARAMETER); - return FALSE; - } - - Ret = IntGdiPolyPolygon(dc, Safept, SafePolyPoints, Count); - - ExFreePool(Safept); - DC_UnlockDc(dc); - - return Ret; -} -
ULONG_PTR STDCALL @@ -999,11 +822,11 @@ INT nPoints, nEmpty, nInvalid, i;
if (iFunc == GdiPolyPolyRgn) - { // Rename me to FASTCALL GdiCreatePolyPolygonRgn - return (ULONG_PTR) NtGdiCreatePolyPolygonRgn((CONST PPOINT) Points, - (CONST PINT) PolyCounts, - Count, - (INT) hDC); + { + return (ULONG_PTR) GdiCreatePolyPolygonRgn((CONST PPOINT) Points, + (CONST PINT) PolyCounts, + Count, + (INT) hDC); } dc = DC_LockDc(hDC); if(!dc)
Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/region.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/region.c Wed Aug 29 02:11:55 2007 @@ -3423,8 +3423,8 @@
HRGN -STDCALL -NtGdiCreatePolyPolygonRgn(CONST PPOINT pt, +FASTCALL +GdiCreatePolyPolygonRgn(CONST PPOINT pt, CONST PINT PolyCounts, INT Count, INT PolyFillMode)
Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/w32... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/w32ksvc.db (original) +++ trunk/reactos/subsystems/win32/win32k/w32ksvc.db Wed Aug 29 02:11:55 2007 @@ -804,8 +804,6 @@ NtGdiPolylineTo 3 NtGdiPolyPolyline 4 NtGdiPolyTextOut 3 -NtGdiPolygon 3 -NtGdiPolyPolygon 4 NtGdiRealizePalette 1 NtGdiRemoveFontResource 1 #