diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-10-18 06:01:39 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-10-18 06:01:39 +0000 |
commit | 454e9f6593cd2d35c84e9cd445e68a2f68d6e201 (patch) | |
tree | 4489283dfc4d542f0e8425cb701513ed18e43bcf /Nt32Pkg/PlatformBdsDxe/Generic/MemoryTest.c | |
parent | f083a41cf270247f417caa24d9b71acca84af260 (diff) | |
download | edk2-platforms-454e9f6593cd2d35c84e9cd445e68a2f68d6e201.tar.xz |
Clean UGA from Nt32Pkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4161 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Nt32Pkg/PlatformBdsDxe/Generic/MemoryTest.c')
-rw-r--r-- | Nt32Pkg/PlatformBdsDxe/Generic/MemoryTest.c | 84 |
1 files changed, 14 insertions, 70 deletions
diff --git a/Nt32Pkg/PlatformBdsDxe/Generic/MemoryTest.c b/Nt32Pkg/PlatformBdsDxe/Generic/MemoryTest.c index 0ed4207cd8..e4cda86851 100644 --- a/Nt32Pkg/PlatformBdsDxe/Generic/MemoryTest.c +++ b/Nt32Pkg/PlatformBdsDxe/Generic/MemoryTest.c @@ -55,59 +55,33 @@ Returns: --*/
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
- EFI_UGA_DRAW_PROTOCOL *UgaDraw;
- UINT32 SizeOfX;
- UINT32 SizeOfY;
- UINT32 ColorDepth;
- UINT32 RefreshRate;
+ UINT32 SizeOfX;
+ UINT32 SizeOfY;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL Color;
- UINTN BlockHeight;
- UINTN BlockWidth;
- UINTN BlockNum;
- UINTN PosX;
- UINTN PosY;
- UINTN Index;
+ UINTN BlockHeight;
+ UINTN BlockWidth;
+ UINTN BlockNum;
+ UINTN PosX;
+ UINTN PosY;
+ UINTN Index;
if (Progress > 100) {
return EFI_INVALID_PARAMETER;
}
- UgaDraw = NULL;
Status = gBS->HandleProtocol (
gST->ConsoleOutHandle,
&gEfiGraphicsOutputProtocolGuid,
&GraphicsOutput
);
if (EFI_ERROR (Status)) {
- GraphicsOutput = NULL;
-
- Status = gBS->HandleProtocol (
- gST->ConsoleOutHandle,
- &gEfiUgaDrawProtocolGuid,
- &UgaDraw
- );
- if (EFI_ERROR (Status)) {
- return EFI_UNSUPPORTED;
- }
+ return EFI_UNSUPPORTED;
}
- if (GraphicsOutput != NULL) {
- SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;
- SizeOfY = GraphicsOutput->Mode->Info->VerticalResolution;
- } else {
- Status = UgaDraw->GetMode (
- UgaDraw,
- &SizeOfX,
- &SizeOfY,
- &ColorDepth,
- &RefreshRate
- );
- if (EFI_ERROR (Status)) {
- return EFI_UNSUPPORTED;
- }
- }
+ SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;
+ SizeOfY = GraphicsOutput->Mode->Info->VerticalResolution;
BlockWidth = SizeOfX / 100;
BlockHeight = SizeOfY / 50;
@@ -123,8 +97,7 @@ Returns: //
SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
- if (GraphicsOutput != NULL) {
- Status = GraphicsOutput->Blt (
+ Status = GraphicsOutput->Blt (
GraphicsOutput,
&Color,
EfiBltVideoFill,
@@ -136,28 +109,13 @@ Returns: SizeOfY - (PosY - GLYPH_HEIGHT - 1),
SizeOfX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
);
- } else {
- Status = UgaDraw->Blt (
- UgaDraw,
- (EFI_UGA_PIXEL *) &Color,
- EfiUgaVideoFill,
- 0,
- 0,
- 0,
- PosY - GLYPH_HEIGHT - 1,
- SizeOfX,
- SizeOfY - (PosY - GLYPH_HEIGHT - 1),
- SizeOfX * sizeof (EFI_UGA_PIXEL)
- );
- }
}
//
// Show progress by drawing blocks
//
for (Index = PreviousValue; Index < BlockNum; Index++) {
PosX = Index * BlockWidth;
- if (GraphicsOutput != NULL) {
- Status = GraphicsOutput->Blt (
+ Status = GraphicsOutput->Blt (
GraphicsOutput,
&ProgressColor,
EfiBltVideoFill,
@@ -169,20 +127,6 @@ Returns: BlockHeight,
(BlockWidth) * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
);
- } else {
- Status = UgaDraw->Blt (
- UgaDraw,
- (EFI_UGA_PIXEL *) &ProgressColor,
- EfiUgaVideoFill,
- 0,
- 0,
- PosX,
- PosY,
- BlockWidth - 1,
- BlockHeight,
- (BlockWidth) * sizeof (EFI_UGA_PIXEL)
- );
- }
}
PrintXY (
|