From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web11.1082.1642121466955476862 for ; Thu, 13 Jan 2022 16:51:14 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=D0vNphYA; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: guomin.jiang@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642121474; x=1673657474; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xqxGme8Hbvp3IeEs4oLs//5zwByN7AbEwSTpM42aVEs=; b=D0vNphYASYvcCWhFoWfRAu5Rx6eAjGfKegksyRh8aLOxXMPSGm4juSvo o7Ex4XJvrz7SNSxTuwu8pYOlZue6OioCl/oWiJJSETo5UeCvVKFS0qDbG hMomquH4bCm8XiJv2j05A2vvA2ukZLnTKvcBIdMbTMsDY0p6eg2MHaxFV xnV7R9oPdXwl2JlmRF6cIy7y3Vz6hQSnUFOvnZJVslvxBiwUHN7Eqc/aN CRk+2nRsmVRwCmMlmitakgCGmysB2wnOkMgkXsdX9bHgfCbe5oXcd7d+O KNMtFn6jcTm/78MCfxKexrJAoUOyimUH5Atmv1bGxHAUUm3ERGTXVwZvU Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10226"; a="241713824" X-IronPort-AV: E=Sophos;i="5.88,287,1635231600"; d="scan'208";a="241713824" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2022 16:51:13 -0800 X-IronPort-AV: E=Sophos;i="5.88,287,1635231600"; d="scan'208";a="475564677" Received: from guominji-mobl.ccr.corp.intel.com ([10.238.9.87]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2022 16:51:12 -0800 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: GuoMinJ , Andrew Fish , Ray Ni Subject: [PATCH 04/11] EmulatorPkg: Remove All UGA Support Date: Fri, 14 Jan 2022 08:50:37 +0800 Message-Id: <20220114005044.1975-5-guomin.jiang@intel.com> X-Mailer: git-send-email 2.30.0.windows.2 In-Reply-To: <20220114005044.1975-1-guomin.jiang@intel.com> References: <20220114005044.1975-1-guomin.jiang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: GuoMinJ REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368 Remove All UGA Support in EmulatorPkg. Signed-off-by: Guomin Jiang Cc: Andrew Fish Cc: Ray Ni --- EmulatorPkg/EmuGopDxe/Gop.h | 10 +-- EmulatorPkg/Include/Protocol/EmuFileSystem.h | 24 +++--- .../Include/Protocol/EmuGraphicsWindow.h | 18 ++-- .../Library/PlatformBmLib/PlatformBm.h | 4 +- EmulatorPkg/Unix/Host/Gasket.h | 12 +-- EmulatorPkg/Unix/Host/Host.h | 3 +- EmulatorPkg/EmuGopDxe/GopScreen.c | 16 ++-- .../Library/PlatformBmLib/PlatformBmData.c | 6 +- EmulatorPkg/Unix/Host/X11GraphicsWindow.c | 82 +++++++++---------- EmulatorPkg/Win/Host/WinGopScreen.c | 10 +-- EmulatorPkg/Unix/Host/Ia32/Gasket.S | 2 +- EmulatorPkg/Unix/Host/X64/Gasket.S | 2 +- 12 files changed, 93 insertions(+), 96 deletions(-) diff --git a/EmulatorPkg/EmuGopDxe/Gop.h b/EmulatorPkg/EmuGopDxe/Gop.h index 7f7dc4e8eb9f..099449f5007f 100644 --- a/EmulatorPkg/EmuGopDxe/Gop.h +++ b/EmulatorPkg/EmuGopDxe/Gop.h @@ -1,13 +1,13 @@ /*++ @file -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
Portions copyright (c) 2010,Apple Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef __UGA_H_ -#define __UGA_H_ +#ifndef GOP_H_ +#define GOP_H_ #include @@ -60,8 +60,6 @@ typedef struct { extern EFI_DRIVER_BINDING_PROTOCOL gEmuGopDriverBinding; extern EFI_COMPONENT_NAME_PROTOCOL gEmuGopComponentName; -#define EMU_UGA_CLASS_NAME L"EmuGopWindow" - #define GOP_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('G', 'o', 'p', 'N') typedef struct { UINT64 Signature; @@ -83,7 +81,7 @@ typedef struct { GOP_MODE_DATA *ModeData; // - // UGA Private Data knowing when to start hardware + // Private Data knowing when to start hardware // BOOLEAN HardwareNeedsStarting; diff --git a/EmulatorPkg/Include/Protocol/EmuFileSystem.h b/EmulatorPkg/Include/Protocol/EmuFileSystem.h index 15de43ac022e..d0c0dee26bff 100644 --- a/EmulatorPkg/Include/Protocol/EmuFileSystem.h +++ b/EmulatorPkg/Include/Protocol/EmuFileSystem.h @@ -7,19 +7,19 @@ UEFI 2.0 can boot from any valid EFI image contained in a SimpleFileSystem. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
Portions copyright (c) 2011, Apple Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef _EMU_UGA_IO_H_ -#define _EMU_UGA_IO_H_ +#ifndef EMU_GRAPHICS_WINDOW_H_ +#define EMU_GRAPHICS_WINDOW_H_ #include #include #include -#include +#include #define EMU_GRAPHICS_WINDOW_PROTOCOL_GUID \ { 0x30FD316A, 0x6728, 0x2E41, { 0xA6, 0x90, 0x0D, 0x13, 0x33, 0xD8, 0xCA, 0xC1 } } @@ -29,13 +29,13 @@ typedef struct _EMU_GRAPHICS_WINDOW_PROTOCOL EMU_GRAPHICS_WINDOW_PROTOCOL; typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_CLOSE)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows ); typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_SIZE)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga, + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, UINT32 Width, UINT32 Height ); @@ -43,13 +43,13 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_CHECK_KEY)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows ); typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_GET_KEY)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga, + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, EFI_KEY_DATA *key ); @@ -88,10 +88,10 @@ typedef struct { typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_BLT)( - IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, - IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, - IN EFI_UGA_BLT_OPERATION BltOperation, - IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args + IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, + IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, + IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args ); typedef diff --git a/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h b/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h index 7c495b25eb1b..ed7b71611f90 100644 --- a/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h +++ b/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h @@ -6,13 +6,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef _EMU_UGA_IO_H_ -#define _EMU_UGA_IO_H_ +#ifndef EMU_GRAPHICS_WINDOW_H_ +#define EMU_GRAPHICS_WINDOW_H_ #include #include #include -#include +#include #define EMU_GRAPHICS_WINDOW_PROTOCOL_GUID \ { 0x30FD316A, 0x6728, 0x2E41, { 0xA6, 0x90, 0x0D, 0x13, 0x33, 0xD8, 0xCA, 0xC1 } } @@ -22,13 +22,13 @@ typedef struct _EMU_GRAPHICS_WINDOW_PROTOCOL EMU_GRAPHICS_WINDOW_PROTOCOL; typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_CLOSE)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindow ); typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_SIZE)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga, + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindow, UINT32 Width, UINT32 Height ); @@ -36,13 +36,13 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_CHECK_KEY)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindow ); typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_GET_KEY)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga, + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindow, EFI_KEY_DATA *key ); @@ -83,8 +83,8 @@ typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_BLT)( IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, - IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, - IN EFI_UGA_BLT_OPERATION BltOperation, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, + IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args ); diff --git a/EmulatorPkg/Library/PlatformBmLib/PlatformBm.h b/EmulatorPkg/Library/PlatformBmLib/PlatformBm.h index b89ffd77e4de..673bfba577b8 100644 --- a/EmulatorPkg/Library/PlatformBmLib/PlatformBm.h +++ b/EmulatorPkg/Library/PlatformBmLib/PlatformBm.h @@ -1,6 +1,6 @@ /*++ @file -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
Portions copyright (c) 2011, Apple Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @@ -60,7 +60,7 @@ typedef struct { EMU_VENDOR_DEVICE_PATH_NODE EmuBus; EMU_VENDOR_DEVICE_PATH_NODE EmuGraphicsWindow; EFI_DEVICE_PATH_PROTOCOL End; -} EMU_PLATFORM_UGA_DEVICE_PATH; +} EMU_PLATFORM_GRAPHICS_WINDOW_DEVICE_PATH; // // Platform BDS Functions diff --git a/EmulatorPkg/Unix/Host/Gasket.h b/EmulatorPkg/Unix/Host/Gasket.h index 6dafc903cfce..7c52e7f121d6 100644 --- a/EmulatorPkg/Unix/Host/Gasket.h +++ b/EmulatorPkg/Unix/Host/Gasket.h @@ -1,7 +1,7 @@ /** @file Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.
- Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2011 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -200,7 +200,7 @@ ReverseGasketUint64Uint64 ( ); // -// Gasket functions for EFI_EMU_UGA_IO_PROTOCOL +// Gasket functions for EFI_EMU_GRAPHICS_WINDOW_PROTOCOL // EFI_STATUS @@ -243,10 +243,10 @@ GasketX11RegisterKeyNotify ( EFI_STATUS EFIAPI GasketX11Blt ( - IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, - IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, - IN EFI_UGA_BLT_OPERATION BltOperation, - IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args + IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, + IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, + IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args ); EFI_STATUS diff --git a/EmulatorPkg/Unix/Host/Host.h b/EmulatorPkg/Unix/Host/Host.h index 0c81cdfc01f5..a1ac4207bef9 100644 --- a/EmulatorPkg/Unix/Host/Host.h +++ b/EmulatorPkg/Unix/Host/Host.h @@ -1,6 +1,6 @@ /*++ @file -Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
Portions copyright (c) 2008 - 2011, Apple Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -106,7 +106,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include -#include #include #include diff --git a/EmulatorPkg/EmuGopDxe/GopScreen.c b/EmulatorPkg/EmuGopDxe/GopScreen.c index 41f748bc6402..e8030a50ce23 100644 --- a/EmulatorPkg/EmuGopDxe/GopScreen.c +++ b/EmulatorPkg/EmuGopDxe/GopScreen.c @@ -1,6 +1,6 @@ /*++ @file -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
Portions copyright (c) 2010 - 2011, Apple Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @@ -10,7 +10,7 @@ Module Name: Abstract: - This file produces the graphics abstration of UGA. It is called by + This file produces the graphics abstration of GOP. It is called by EmuGopDriver.c file which deals with the EFI 1.1 driver model. This file just does graphics. @@ -208,7 +208,7 @@ EmuGopBlt ( // the number of bytes in each row can be computed. // if (Delta == 0) { - Delta = Width * sizeof (EFI_UGA_PIXEL); + Delta = Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL); } // @@ -219,8 +219,8 @@ EmuGopBlt ( OriginalTPL = gBS->RaiseTPL (TPL_NOTIFY); // - // Pack UGA Draw protocol parameters to EMU_GRAPHICS_WINDOWS__BLT_ARGS structure to adapt to - // GopBlt() API of Unix UGA IO protocol. + // Pack GOP protocol parameters to EMU_GRAPHICS_WINDOWS__BLT_ARGS structure to adapt to + // GopBlt() API of GOP protocol. // GopBltArgs.DestinationX = DestinationX; GopBltArgs.DestinationY = DestinationY; @@ -231,8 +231,8 @@ EmuGopBlt ( GopBltArgs.Delta = Delta; Status = Private->EmuGraphicsWindow->Blt ( Private->EmuGraphicsWindow, - (EFI_UGA_PIXEL *)BltBuffer, - (EFI_UGA_BLT_OPERATION)BltOperation, + BltBuffer, + BltOperation, &GopBltArgs ); @@ -383,7 +383,7 @@ ShutdownGopEvent ( Routine Description: - This is the UGA screen's callback notification function for exit-boot-services. + This is the screen's callback notification function for exit-boot-services. All we do here is call EmuGopDestructor(). Arguments: diff --git a/EmulatorPkg/Library/PlatformBmLib/PlatformBmData.c b/EmulatorPkg/Library/PlatformBmLib/PlatformBmData.c index efb03def37eb..b69c4728d1a7 100644 --- a/EmulatorPkg/Library/PlatformBmLib/PlatformBmData.c +++ b/EmulatorPkg/Library/PlatformBmLib/PlatformBmData.c @@ -1,6 +1,6 @@ /*++ @file -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
Portions copyright (c) 2011, Apple Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @@ -8,7 +8,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "PlatformBm.h" -EMU_PLATFORM_UGA_DEVICE_PATH gGopDevicePath = { +EMU_PLATFORM_GRAPHICS_WINDOW_DEVICE_PATH gGopDevicePath = { { { { @@ -40,7 +40,7 @@ EMU_PLATFORM_UGA_DEVICE_PATH gGopDevicePath = { gEndEntire }; -EMU_PLATFORM_UGA_DEVICE_PATH gGopDevicePath2 = { +EMU_PLATFORM_GRAPHICS_WINDOW_DEVICE_PATH gGopDevicePath2 = { { { { diff --git a/EmulatorPkg/Unix/Host/X11GraphicsWindow.c b/EmulatorPkg/Unix/Host/X11GraphicsWindow.c index a30cc19dbe0a..b3880e198855 100644 --- a/EmulatorPkg/Unix/Host/X11GraphicsWindow.c +++ b/EmulatorPkg/Unix/Host/X11GraphicsWindow.c @@ -1,6 +1,6 @@ /*++ @file -Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2022, Intel Corporation. All rights reserved.
Portions copyright (c) 2008 - 2011, Apple Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -700,8 +700,8 @@ HandleEvents ( unsigned long X11PixelToColor ( - IN GRAPHICS_IO_PRIVATE *Drv, - IN EFI_UGA_PIXEL pixel + IN GRAPHICS_IO_PRIVATE *Drv, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL pixel ) { return ((pixel.Red >> Drv->r.csize) << Drv->r.shift) @@ -709,15 +709,15 @@ X11PixelToColor ( | ((pixel.Blue >> Drv->b.csize) << Drv->b.shift); } -EFI_UGA_PIXEL +EFI_GRAPHICS_OUTPUT_BLT_PIXEL X11ColorToPixel ( IN GRAPHICS_IO_PRIVATE *Drv, IN unsigned long val ) { - EFI_UGA_PIXEL Pixel; + EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel; - memset (&Pixel, 0, sizeof (EFI_UGA_PIXEL)); + memset (&Pixel, 0, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); // Truncation not an issue since X11 and EFI are both using 8 bits per color Pixel.Red = (val >> Drv->r.shift) << Drv->r.csize; @@ -782,7 +782,7 @@ X11KeySetState ( if ((Drv->KeyState.KeyToggleState & EFI_CAPS_LOCK_ACTIVE) == 0) { // // We could create an XKeyEvent and send a XK_Caps_Lock to - // the UGA/GOP Window + // the GOP Window // } } @@ -812,32 +812,32 @@ X11RegisterKeyNotify ( EFI_STATUS X11Blt ( - IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, - IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, - IN EFI_UGA_BLT_OPERATION BltOperation, - IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args + IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, + IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, + IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args ) { - GRAPHICS_IO_PRIVATE *Private; - UINTN DstY; - UINTN SrcY; - UINTN DstX; - UINTN SrcX; - UINTN Index; - EFI_UGA_PIXEL *Blt; - UINT8 *Dst; - UINT8 *Src; - UINTN Nbr; - unsigned long Color; - XEvent ev; + GRAPHICS_IO_PRIVATE *Private; + UINTN DstY; + UINTN SrcY; + UINTN DstX; + UINTN SrcX; + UINTN Index; + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Blt; + UINT8 *Dst; + UINT8 *Src; + UINTN Nbr; + unsigned long Color; + XEvent ev; Private = (GRAPHICS_IO_PRIVATE *)GraphicsIo; // // Check bounds // - if ( (BltOperation == EfiUgaVideoToBltBuffer) - || (BltOperation == EfiUgaVideoToVideo)) + if ( (BltOperation == EfiBltVideoToBltBuffer) + || (BltOperation == EfiBltVideoToVideo)) { // // Source is Video. @@ -851,9 +851,9 @@ X11Blt ( } } - if ( (BltOperation == EfiUgaBltBufferToVideo) - || (BltOperation == EfiUgaVideoToVideo) - || (BltOperation == EfiUgaVideoFill)) + if ( (BltOperation == EfiBltBufferToVideo) + || (BltOperation == EfiBltVideoToVideo) + || (BltOperation == EfiBltVideoFill)) { // // Destination is Video @@ -868,32 +868,32 @@ X11Blt ( } switch (BltOperation) { - case EfiUgaVideoToBltBuffer: - Blt = (EFI_UGA_PIXEL *)((UINT8 *)BltBuffer + (Args->DestinationY * Args->Delta) + Args->DestinationX * sizeof (EFI_UGA_PIXEL)); - Args->Delta -= Args->Width * sizeof (EFI_UGA_PIXEL); + case EfiBltVideoToBltBuffer: + Blt = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)((UINT8 *)BltBuffer + (Args->DestinationY * Args->Delta) + Args->DestinationX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); + Args->Delta -= Args->Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL); for (SrcY = Args->SourceY; SrcY < (Args->Height + Args->SourceY); SrcY++) { for (SrcX = Args->SourceX; SrcX < (Args->Width + Args->SourceX); SrcX++) { *Blt++ = X11ColorToPixel (Private, XGetPixel (Private->image, SrcX, SrcY)); } - Blt = (EFI_UGA_PIXEL *)((UINT8 *)Blt + Args->Delta); + Blt = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)((UINT8 *)Blt + Args->Delta); } break; - case EfiUgaBltBufferToVideo: - Blt = (EFI_UGA_PIXEL *)((UINT8 *)BltBuffer + (Args->SourceY * Args->Delta) + Args->SourceX * sizeof (EFI_UGA_PIXEL)); - Args->Delta -= Args->Width * sizeof (EFI_UGA_PIXEL); + case EfiBltBufferToVideo: + Blt = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)((UINT8 *)BltBuffer + (Args->SourceY * Args->Delta) + Args->SourceX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); + Args->Delta -= Args->Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL); for (DstY = Args->DestinationY; DstY < (Args->Height + Args->DestinationY); DstY++) { for (DstX = Args->DestinationX; DstX < (Args->Width + Args->DestinationX); DstX++) { XPutPixel (Private->image, DstX, DstY, X11PixelToColor (Private, *Blt)); Blt++; } - Blt = (EFI_UGA_PIXEL *)((UINT8 *)Blt + Args->Delta); + Blt = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)((UINT8 *)Blt + Args->Delta); } break; - case EfiUgaVideoToVideo: + case EfiBltVideoToVideo: Dst = Private->image_data + (Args->DestinationX << Private->pixel_shift) + Args->DestinationY * Private->line_bytes; Src = Private->image_data + (Args->SourceX << Private->pixel_shift) @@ -920,7 +920,7 @@ X11Blt ( } break; - case EfiUgaVideoFill: + case EfiBltVideoFill: Color = X11PixelToColor (Private, *BltBuffer); for (DstY = Args->DestinationY; DstY < (Args->Height + Args->DestinationY); DstY++) { for (DstX = Args->DestinationX; DstX < (Args->Width + Args->DestinationX); DstX++) { @@ -937,7 +937,7 @@ X11Blt ( // Refresh screen. // switch (BltOperation) { - case EfiUgaVideoToVideo: + case EfiBltVideoToVideo: XCopyArea ( Private->display, Private->win, @@ -960,7 +960,7 @@ X11Blt ( } break; - case EfiUgaVideoFill: + case EfiBltVideoFill: Color = X11PixelToColor (Private, *BltBuffer); XSetForeground (Private->display, Private->gc, Color); XFillRectangle ( @@ -974,7 +974,7 @@ X11Blt ( ); XFlush (Private->display); break; - case EfiUgaBltBufferToVideo: + case EfiBltBufferToVideo: Redraw (Private, Args->DestinationX, Args->DestinationY, Args->Width, Args->Height); break; default: diff --git a/EmulatorPkg/Win/Host/WinGopScreen.c b/EmulatorPkg/Win/Host/WinGopScreen.c index 661573d7771c..17da6feefd5d 100644 --- a/EmulatorPkg/Win/Host/WinGopScreen.c +++ b/EmulatorPkg/Win/Host/WinGopScreen.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent Module Name: @@ -396,10 +396,10 @@ WinNtWndSize ( // TODO: Delta - add argument and description to function comment EFI_STATUS WinNtWndBlt ( - IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, - IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, - IN EFI_UGA_BLT_OPERATION BltOperation, - IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args + IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, + IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, + IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args ) { RETURN_STATUS RStatus; diff --git a/EmulatorPkg/Unix/Host/Ia32/Gasket.S b/EmulatorPkg/Unix/Host/Ia32/Gasket.S index 36197ff26028..6fcdd265cf30 100644 --- a/EmulatorPkg/Unix/Host/Ia32/Gasket.S +++ b/EmulatorPkg/Unix/Host/Ia32/Gasket.S @@ -371,7 +371,7 @@ ASM_PFX(GasketSecEmuThunkAddress): ret // -// Gasket functions for EFI_EMU_UGA_IO_PROTOCOL +// Gasket functions for EFI_EMU_GRAPHICS_WINDOW_PROTOCOL // ASM_GLOBAL ASM_PFX(GasketX11Size) diff --git a/EmulatorPkg/Unix/Host/X64/Gasket.S b/EmulatorPkg/Unix/Host/X64/Gasket.S index 030faa8e4c36..1b4614ab618d 100644 --- a/EmulatorPkg/Unix/Host/X64/Gasket.S +++ b/EmulatorPkg/Unix/Host/X64/Gasket.S @@ -427,7 +427,7 @@ ASM_PFX(GasketSecEmuThunkAddress): ret // -// Gasket functions for EFI_EMU_UGA_IO_PROTOCOL +// Gasket functions for EFI_EMU_GRAPHICS_WINDOW_PROTOCOL // ASM_GLOBAL ASM_PFX(GasketX11Size) -- 2.30.0.windows.2