mirror of
https://github.com/reactos/reactos.git
synced 2024-11-23 11:33:31 +08:00
[NTGDI][FREETYPE] Increase STACK_TEXT_BUFFER_SIZE (#6847)
Slight performance improvement. STACK_TEXT_BUFFER_SIZE = 100 was too small for long text. This PR can reduce unnecessary buffer allocations in NtGdiExtTextOutW function. JIRA issue: CORE-15554 - Change STACK_TEXT_BUFFER_SIZE to 512.
This commit is contained in:
parent
0056313e15
commit
521eb0c7c0
@ -6492,7 +6492,8 @@ GreExtTextOutW(
|
||||
return bResult;
|
||||
}
|
||||
|
||||
#define STACK_TEXT_BUFFER_SIZE 100
|
||||
#define STACK_TEXT_BUFFER_SIZE 512
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
NtGdiExtTextOutW(
|
||||
@ -6534,7 +6535,7 @@ NtGdiExtTextOutW(
|
||||
}
|
||||
|
||||
/* Check if our local buffer is large enough */
|
||||
if (BufSize > STACK_TEXT_BUFFER_SIZE)
|
||||
if (BufSize > sizeof(LocalBuffer))
|
||||
{
|
||||
/* It's not, allocate a temp buffer */
|
||||
Buffer = ExAllocatePoolWithTag(PagedPool, BufSize, GDITAG_TEXT);
|
||||
|
Loading…
Reference in New Issue
Block a user