Author: hbelusca
Date: Wed Jun 8 23:07:32 2016
New Revision: 71596
URL:
http://svn.reactos.org/svn/reactos?rev=71596&view=rev
Log:
[WIN32K:NTGDI]: Remove redundant code.
Modified:
trunk/reactos/win32ss/gdi/ntgdi/coord.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/coord.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/coord.c?…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/coord.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/coord.c [iso-8859-1] Wed Jun 8 23:07:32 2016
@@ -1341,7 +1341,7 @@
_In_ HDC hdc,
_Out_ LPSIZE lpSize)
{
- return GreGetDCPoint(hdc, GdiGetWindowExt, (PPOINTL)lpSize);
+ return GreGetDCPoint(hdc, GdiGetWindowExt, (PPOINTL)lpSize);
}
BOOL
@@ -1350,7 +1350,7 @@
_In_ HDC hdc,
_Out_ LPSIZE lpSize)
{
- return GreGetDCPoint(hdc, GdiGetViewPortExt, (PPOINTL)lpSize);
+ return GreGetDCPoint(hdc, GdiGetViewPortExt, (PPOINTL)lpSize);
}
BOOL APIENTRY
@@ -1360,10 +1360,7 @@
PPOINTL Point)
{
BOOL Ret = TRUE;
- DC *pdc;
POINTL SafePoint;
- SIZE Size;
- PSIZEL pszlViewportExt;
if (!Point)
{
@@ -1371,50 +1368,7 @@
return FALSE;
}
- pdc = DC_LockDc(hDC);
- if (!pdc)
- {
- EngSetLastError(ERROR_INVALID_HANDLE);
- return FALSE;
- }
-
- switch (iPoint)
- {
- case GdiGetViewPortExt:
- pszlViewportExt = DC_pszlViewportExt(pdc);
- SafePoint.x = pszlViewportExt->cx;
- SafePoint.y = pszlViewportExt->cy;
- break;
-
- case GdiGetWindowExt:
- SafePoint.x = pdc->pdcattr->szlWindowExt.cx;
- SafePoint.y = pdc->pdcattr->szlWindowExt.cy;
- break;
-
- case GdiGetViewPortOrg:
- SafePoint = pdc->pdcattr->ptlViewportOrg;
- break;
-
- case GdiGetWindowOrg:
- SafePoint = pdc->pdcattr->ptlWindowOrg;
- break;
-
- case GdiGetDCOrg:
- SafePoint = pdc->ptlDCOrig;
- break;
-
- case GdiGetAspectRatioFilter:
- DC_vGetAspectRatioFilter(pdc, &Size);
- SafePoint.x = Size.cx;
- SafePoint.y = Size.cy;
- break;
-
- default:
- EngSetLastError(ERROR_INVALID_PARAMETER);
- Ret = FALSE;
- break;
- }
-
+ Ret = GreGetDCPoint(hDC, iPoint, &SafePoint);
if (Ret)
{
_SEH2_TRY
@@ -1429,7 +1383,6 @@
_SEH2_END;
}
- DC_UnlockDc(pdc);
return Ret;
}