From 3f57706fa96054e86ceb20cfc2858347cd733cd2 Mon Sep 17 00:00:00 2001 From: vanjeff Date: Mon, 23 Feb 2009 03:02:07 +0000 Subject: [PATCH] remove console control protocol consuming in DrawImage(), caller should make sure current mode is graphics mode. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7568 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf | 1 - MdeModulePkg/Universal/HiiDatabaseDxe/Image.c | 14 +++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf index a0d34a31b9..5007c58375 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf @@ -59,7 +59,6 @@ UefiRuntimeServicesTableLib [Protocols] - gEfiConsoleControlProtocolGuid ## CONSUMES gEfiDevicePathProtocolGuid ## SOMETIMES_CONSUMES gEfiHiiStringProtocolGuid ## PRODUCES gEfiHiiImageProtocolGuid |PcdSupportHiiImageProtocol ## PRODUCES diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c index dc543b80e1..8c74e8e424 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c @@ -1233,7 +1233,6 @@ HiiDrawImage ( UINTN OffsetY2; EFI_FONT_DISPLAY_INFO *FontInfo; UINTN Index; - EFI_CONSOLE_CONTROL_PROTOCOL *Console; if (This == NULL || Image == NULL || Blt == NULL) { return EFI_INVALID_PARAMETER; @@ -1323,17 +1322,10 @@ HiiDrawImage ( // Draw the image to existing bitmap or screen depending on flag. // if ((Flags & EFI_HII_DIRECT_TO_SCREEN) == EFI_HII_DIRECT_TO_SCREEN) { - Status = gBS->LocateProtocol ( - &gEfiConsoleControlProtocolGuid, - NULL, - (VOID **) &Console - ); - - if (EFI_ERROR (Status)) { - return Status; - } + // + // Caller should make sure the current UGA console is grarphic mode. + // - Console->SetMode (Console, EfiConsoleControlScreenGraphics); // // Write the image directly to the output device specified by Screen. // -- 2.39.2