]> git.proxmox.com Git - mirror_edk2.git/commitdiff
[Description]
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 22 Apr 2008 09:11:43 +0000 (09:11 +0000)
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 22 Apr 2008 09:11:43 +0000 (09:11 +0000)
add a judgement of whether the control command is equal with previous one or not.
[Impaction]
Judge if the control command is equaled with previous one. This handler can improve performance.
[Reference Info]
Currently the terminal driver outputs control commands upon user's request regardless of whether the new attribute is the same as previous one or not.
Actually, it could be implemented as only outputting control command when the new Attribute is different than previous one

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5113 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c

index a6fecb8772b7f97cc8b836381ac9e14672597910..88274b117a8d11bcfb898ff45b9a975cbc83b4dc 100644 (file)
@@ -4384,7 +4384,7 @@ ConSplitterTextOutReset (
     }\r
   }\r
 \r
-  This->SetAttribute (This, EFI_TEXT_ATTR (This->Mode->Attribute & 0x0F, EFI_BACKGROUND_BLACK));\r
+  This->SetAttribute (This, EFI_TEXT_ATTR (This->Mode->Attribute & 0x0F, EFI_BLACK));\r
 \r
   Status = DevNullTextOutSetMode (Private, 0);\r
   if (EFI_ERROR (Status)) {\r
index 65fbfc1ef47f7ce9b9bb1ec11e36eb85e5ce3cc6..06fda61274fa15885136aab4ac28f0adae46f981 100644 (file)
@@ -150,7 +150,7 @@ TerminalConOutReset (
     }\r
   }\r
 \r
-  This->SetAttribute (This, EFI_TEXT_ATTR (This->Mode->Attribute & 0x0F, EFI_BACKGROUND_BLACK));\r
+  This->SetAttribute (This, EFI_TEXT_ATTR (This->Mode->Attribute & 0x0F, EFI_BLACK));\r
 \r
   Status = This->SetMode (This, 0);\r
 \r
@@ -605,6 +605,15 @@ TerminalConOutSetAttribute (
   if ((Attribute | 0x7f) != 0x7f) {\r
     return EFI_UNSUPPORTED;\r
   }\r
+\r
+  //\r
+  // Skip outputting the command string for the same attribute\r
+  // It improves the terminal performance siginificantly\r
+  //\r
+  if (This->Mode->Attribute == (INT32) Attribute) {\r
+    return EFI_SUCCESS;\r
+  }\r
+\r
   //\r
   //  convert Attribute value to terminal emulator\r
   //  understandable foreground color\r