mirror of
https://github.com/reactos/reactos.git
synced 2025-08-09 12:53:14 +00:00
[0.4.11][NTGDI] 'otm' is always non-NULL in epilogue, and Mute a DPRINT CORE-16993
The DPRINT1 spams and hits performance, e.g. in the application 'SuperFinder XT'. The logging was introduced by 0.4.11-dev-143-g6b67ef6e10
fix picked from commit 0.4.15-dev-67-ga98bebb0b0
and the second part '[WIN32SS][NTGDI] 'otm' is always non-NULL in epilogue' is a small optimization picked from 0.4.14-dev-108-g1bf982ff88
otm is checked for NULL already a few lines before in that function, and is not touched anymore in between the two locations. Tiny bit shorter+smaller now, and might satisfy also some static code-analysis. The origin of checking it twice for NULL dates back into much older times of ros.
This commit is contained in:
parent
693762eb55
commit
238c4f45af
1 changed files with 17 additions and 18 deletions
|
@ -301,7 +301,7 @@ FontGetObject(PTEXTOBJ plfont, ULONG cjBuffer, PVOID pvBuffer)
|
||||||
if (!(plfont->fl & TEXTOBJECT_INIT))
|
if (!(plfont->fl & TEXTOBJECT_INIT))
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
DPRINT1("FontGetObject font not initialized!\n");
|
DPRINT("FontGetObject font not initialized!\n");
|
||||||
|
|
||||||
Status = TextIntRealizeFont(plfont->BaseObject.hHmgr, plfont);
|
Status = TextIntRealizeFont(plfont->BaseObject.hHmgr, plfont);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -923,25 +923,24 @@ NtGdiGetOutlineTextMetricsInternalW (HDC hDC,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
IntGetOutlineTextMetrics(FontGDI, Size, potm);
|
IntGetOutlineTextMetrics(FontGDI, Size, potm);
|
||||||
if (otm)
|
|
||||||
{
|
|
||||||
_SEH2_TRY
|
|
||||||
{
|
|
||||||
ProbeForWrite(otm, Size, 1);
|
|
||||||
RtlCopyMemory(otm, potm, Size);
|
|
||||||
}
|
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
|
||||||
{
|
|
||||||
Status = _SEH2_GetExceptionCode();
|
|
||||||
}
|
|
||||||
_SEH2_END
|
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
ProbeForWrite(otm, Size, 1);
|
||||||
Size = 0;
|
RtlCopyMemory(otm, potm, Size);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
Status = _SEH2_GetExceptionCode();
|
||||||
|
}
|
||||||
|
_SEH2_END
|
||||||
|
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
Size = 0;
|
||||||
|
}
|
||||||
|
|
||||||
ExFreePoolWithTag(potm,GDITAG_TEXT);
|
ExFreePoolWithTag(potm,GDITAG_TEXT);
|
||||||
return Size;
|
return Size;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue