mirror of
https://github.com/reactos/reactos.git
synced 2024-11-23 03:23:34 +08:00
[BLUE] Optimize ScrIoControl for speed (#5185)
Optimize IOCTL_CONSOLE_FILL_OUTPUT_ATTRIBUTE and IOCTL_CONSOLE_FILL_OUTPUT_CHARACTER for speed by using cache. CORE-18838
This commit is contained in:
parent
6084da8c84
commit
3526ffc094
@ -1073,6 +1073,8 @@ ScrIoControl(
|
||||
|
||||
if (DeviceExtension->Enabled && DeviceExtension->VideoMemory)
|
||||
{
|
||||
UCHAR attr = Buf->wAttribute;
|
||||
|
||||
vidmem = DeviceExtension->VideoMemory;
|
||||
offset = (Buf->dwCoord.X + Buf->dwCoord.Y * DeviceExtension->Columns) * 2 + 1;
|
||||
|
||||
@ -1082,7 +1084,7 @@ ScrIoControl(
|
||||
|
||||
for (dwCount = 0; dwCount < nMaxLength; dwCount++)
|
||||
{
|
||||
vidmem[offset + (dwCount * 2)] = (char)Buf->wAttribute;
|
||||
vidmem[offset + (dwCount * 2)] = attr;
|
||||
}
|
||||
Buf->dwTransfered = dwCount;
|
||||
}
|
||||
@ -1271,6 +1273,8 @@ ScrIoControl(
|
||||
|
||||
if (DeviceExtension->Enabled && DeviceExtension->VideoMemory)
|
||||
{
|
||||
UCHAR ch = Buf->cCharacter;
|
||||
|
||||
vidmem = DeviceExtension->VideoMemory;
|
||||
offset = (Buf->dwCoord.X + Buf->dwCoord.Y * DeviceExtension->Columns) * 2;
|
||||
|
||||
@ -1280,7 +1284,7 @@ ScrIoControl(
|
||||
|
||||
for (dwCount = 0; dwCount < nMaxLength; dwCount++)
|
||||
{
|
||||
vidmem[offset + (dwCount * 2)] = (char)Buf->cCharacter;
|
||||
vidmem[offset + (dwCount * 2)] = ch;
|
||||
}
|
||||
Buf->dwTransfered = dwCount;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user