mirror of https://github.com/acidanthera/audk.git
Remove the non-standard definition: GLYPH_WIDTH and GLYPH_HEIGHT. All reference to these name should use the standard name defined in UEFI 2.1 specification which are EFI_GLYPH_WIDTH and EFI_GLYPH_HEIGHT
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5137 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a0b629b12e
commit
0898c57ce7
|
@ -433,8 +433,8 @@ GraphicsConsoleControllerDriverStart (
|
||||||
//
|
//
|
||||||
// Compute the maximum number of text Rows and Columns that this current graphics mode can support
|
// Compute the maximum number of text Rows and Columns that this current graphics mode can support
|
||||||
//
|
//
|
||||||
Columns = HorizontalResolution / GLYPH_WIDTH;
|
Columns = HorizontalResolution / EFI_GLYPH_WIDTH;
|
||||||
Rows = VerticalResolution / GLYPH_HEIGHT;
|
Rows = VerticalResolution / EFI_GLYPH_HEIGHT;
|
||||||
|
|
||||||
//
|
//
|
||||||
// See if the mode is too small to support the required 80x25 text mode
|
// See if the mode is too small to support the required 80x25 text mode
|
||||||
|
@ -449,8 +449,8 @@ GraphicsConsoleControllerDriverStart (
|
||||||
Private->ModeData[MaxMode].GopWidth = HorizontalResolution;
|
Private->ModeData[MaxMode].GopWidth = HorizontalResolution;
|
||||||
Private->ModeData[MaxMode].GopHeight = VerticalResolution;
|
Private->ModeData[MaxMode].GopHeight = VerticalResolution;
|
||||||
Private->ModeData[MaxMode].GopModeNumber = ModeNumber;
|
Private->ModeData[MaxMode].GopModeNumber = ModeNumber;
|
||||||
Private->ModeData[MaxMode].DeltaX = (HorizontalResolution - (80 * GLYPH_WIDTH)) >> 1;
|
Private->ModeData[MaxMode].DeltaX = (HorizontalResolution - (80 * EFI_GLYPH_WIDTH)) >> 1;
|
||||||
Private->ModeData[MaxMode].DeltaY = (VerticalResolution - (25 * GLYPH_HEIGHT)) >> 1;
|
Private->ModeData[MaxMode].DeltaY = (VerticalResolution - (25 * EFI_GLYPH_HEIGHT)) >> 1;
|
||||||
MaxMode++;
|
MaxMode++;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -460,8 +460,8 @@ GraphicsConsoleControllerDriverStart (
|
||||||
Private->ModeData[MaxMode].GopWidth = HorizontalResolution;
|
Private->ModeData[MaxMode].GopWidth = HorizontalResolution;
|
||||||
Private->ModeData[MaxMode].GopHeight = VerticalResolution;
|
Private->ModeData[MaxMode].GopHeight = VerticalResolution;
|
||||||
Private->ModeData[MaxMode].GopModeNumber = ModeNumber;
|
Private->ModeData[MaxMode].GopModeNumber = ModeNumber;
|
||||||
Private->ModeData[MaxMode].DeltaX = (HorizontalResolution - (80 * GLYPH_WIDTH)) >> 1;
|
Private->ModeData[MaxMode].DeltaX = (HorizontalResolution - (80 * EFI_GLYPH_WIDTH)) >> 1;
|
||||||
Private->ModeData[MaxMode].DeltaY = (VerticalResolution - (50 * GLYPH_HEIGHT)) >> 1;
|
Private->ModeData[MaxMode].DeltaY = (VerticalResolution - (50 * EFI_GLYPH_HEIGHT)) >> 1;
|
||||||
MaxMode++;
|
MaxMode++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -486,8 +486,8 @@ GraphicsConsoleControllerDriverStart (
|
||||||
Private->ModeData[MaxMode].GopWidth = HorizontalResolution;
|
Private->ModeData[MaxMode].GopWidth = HorizontalResolution;
|
||||||
Private->ModeData[MaxMode].GopHeight = VerticalResolution;
|
Private->ModeData[MaxMode].GopHeight = VerticalResolution;
|
||||||
Private->ModeData[MaxMode].GopModeNumber = ModeNumber;
|
Private->ModeData[MaxMode].GopModeNumber = ModeNumber;
|
||||||
Private->ModeData[MaxMode].DeltaX = (HorizontalResolution - (100 * GLYPH_WIDTH)) >> 1;
|
Private->ModeData[MaxMode].DeltaX = (HorizontalResolution - (100 * EFI_GLYPH_WIDTH)) >> 1;
|
||||||
Private->ModeData[MaxMode].DeltaY = (VerticalResolution - (31 * GLYPH_HEIGHT)) >> 1;
|
Private->ModeData[MaxMode].DeltaY = (VerticalResolution - (31 * EFI_GLYPH_HEIGHT)) >> 1;
|
||||||
MaxMode++;
|
MaxMode++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -495,13 +495,13 @@ GraphicsConsoleControllerDriverStart (
|
||||||
// Add Mode #3 that uses the entire display for user-defined mode
|
// Add Mode #3 that uses the entire display for user-defined mode
|
||||||
//
|
//
|
||||||
if (HorizontalResolution > 800 && VerticalResolution > 600) {
|
if (HorizontalResolution > 800 && VerticalResolution > 600) {
|
||||||
Private->ModeData[MaxMode].Columns = HorizontalResolution/GLYPH_WIDTH;
|
Private->ModeData[MaxMode].Columns = HorizontalResolution/EFI_GLYPH_WIDTH;
|
||||||
Private->ModeData[MaxMode].Rows = VerticalResolution/GLYPH_HEIGHT;
|
Private->ModeData[MaxMode].Rows = VerticalResolution/EFI_GLYPH_HEIGHT;
|
||||||
Private->ModeData[MaxMode].GopWidth = HorizontalResolution;
|
Private->ModeData[MaxMode].GopWidth = HorizontalResolution;
|
||||||
Private->ModeData[MaxMode].GopHeight = VerticalResolution;
|
Private->ModeData[MaxMode].GopHeight = VerticalResolution;
|
||||||
Private->ModeData[MaxMode].GopModeNumber = ModeNumber;
|
Private->ModeData[MaxMode].GopModeNumber = ModeNumber;
|
||||||
Private->ModeData[MaxMode].DeltaX = (HorizontalResolution % GLYPH_WIDTH) >> 1;
|
Private->ModeData[MaxMode].DeltaX = (HorizontalResolution % EFI_GLYPH_WIDTH) >> 1;
|
||||||
Private->ModeData[MaxMode].DeltaY = (VerticalResolution % GLYPH_HEIGHT) >> 1;
|
Private->ModeData[MaxMode].DeltaY = (VerticalResolution % EFI_GLYPH_HEIGHT) >> 1;
|
||||||
MaxMode++;
|
MaxMode++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -846,8 +846,8 @@ GraphicsConsoleConOutOutputString (
|
||||||
MaxRow = Private->ModeData[Mode].Rows;
|
MaxRow = Private->ModeData[Mode].Rows;
|
||||||
DeltaX = Private->ModeData[Mode].DeltaX;
|
DeltaX = Private->ModeData[Mode].DeltaX;
|
||||||
DeltaY = Private->ModeData[Mode].DeltaY;
|
DeltaY = Private->ModeData[Mode].DeltaY;
|
||||||
Width = MaxColumn * GLYPH_WIDTH;
|
Width = MaxColumn * EFI_GLYPH_WIDTH;
|
||||||
Height = (MaxRow - 1) * GLYPH_HEIGHT;
|
Height = (MaxRow - 1) * EFI_GLYPH_HEIGHT;
|
||||||
Delta = Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL);
|
Delta = Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -907,7 +907,7 @@ GraphicsConsoleConOutOutputString (
|
||||||
NULL,
|
NULL,
|
||||||
EfiBltVideoToVideo,
|
EfiBltVideoToVideo,
|
||||||
DeltaX,
|
DeltaX,
|
||||||
DeltaY + GLYPH_HEIGHT,
|
DeltaY + EFI_GLYPH_HEIGHT,
|
||||||
DeltaX,
|
DeltaX,
|
||||||
DeltaY,
|
DeltaY,
|
||||||
Width,
|
Width,
|
||||||
|
@ -927,7 +927,7 @@ GraphicsConsoleConOutOutputString (
|
||||||
DeltaX,
|
DeltaX,
|
||||||
DeltaY + Height,
|
DeltaY + Height,
|
||||||
Width,
|
Width,
|
||||||
GLYPH_HEIGHT,
|
EFI_GLYPH_HEIGHT,
|
||||||
Delta
|
Delta
|
||||||
);
|
);
|
||||||
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
|
@ -939,7 +939,7 @@ GraphicsConsoleConOutOutputString (
|
||||||
NULL,
|
NULL,
|
||||||
EfiUgaVideoToVideo,
|
EfiUgaVideoToVideo,
|
||||||
DeltaX,
|
DeltaX,
|
||||||
DeltaY + GLYPH_HEIGHT,
|
DeltaY + EFI_GLYPH_HEIGHT,
|
||||||
DeltaX,
|
DeltaX,
|
||||||
DeltaY,
|
DeltaY,
|
||||||
Width,
|
Width,
|
||||||
|
@ -959,7 +959,7 @@ GraphicsConsoleConOutOutputString (
|
||||||
DeltaX,
|
DeltaX,
|
||||||
DeltaY + Height,
|
DeltaY + Height,
|
||||||
Width,
|
Width,
|
||||||
GLYPH_HEIGHT,
|
EFI_GLYPH_HEIGHT,
|
||||||
Delta
|
Delta
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1274,7 +1274,7 @@ GraphicsConsoleConOutSetMode (
|
||||||
//
|
//
|
||||||
// Attempt to allocate a line buffer for the requested mode number
|
// Attempt to allocate a line buffer for the requested mode number
|
||||||
//
|
//
|
||||||
NewLineBuffer = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * ModeData->Columns * GLYPH_WIDTH * GLYPH_HEIGHT);
|
NewLineBuffer = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * ModeData->Columns * EFI_GLYPH_WIDTH * EFI_GLYPH_HEIGHT);
|
||||||
|
|
||||||
if (NewLineBuffer == NULL) {
|
if (NewLineBuffer == NULL) {
|
||||||
//
|
//
|
||||||
|
@ -1727,8 +1727,8 @@ DrawUnicodeWeightAtCursorN (
|
||||||
String,
|
String,
|
||||||
FontInfo,
|
FontInfo,
|
||||||
&Blt,
|
&Blt,
|
||||||
This->Mode->CursorColumn * GLYPH_WIDTH + Private->ModeData[This->Mode->Mode].DeltaX,
|
This->Mode->CursorColumn * EFI_GLYPH_WIDTH + Private->ModeData[This->Mode->Mode].DeltaX,
|
||||||
This->Mode->CursorRow * GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
|
This->Mode->CursorRow * EFI_GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
|
@ -1757,8 +1757,8 @@ DrawUnicodeWeightAtCursorN (
|
||||||
String,
|
String,
|
||||||
FontInfo,
|
FontInfo,
|
||||||
&Blt,
|
&Blt,
|
||||||
This->Mode->CursorColumn * GLYPH_WIDTH + Private->ModeData[This->Mode->Mode].DeltaX,
|
This->Mode->CursorColumn * EFI_GLYPH_WIDTH + Private->ModeData[This->Mode->Mode].DeltaX,
|
||||||
This->Mode->CursorRow * GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
|
This->Mode->CursorRow * EFI_GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
|
||||||
&RowInfoArray,
|
&RowInfoArray,
|
||||||
&RowInfoArraySize,
|
&RowInfoArraySize,
|
||||||
NULL
|
NULL
|
||||||
|
@ -1775,10 +1775,10 @@ DrawUnicodeWeightAtCursorN (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
(EFI_UGA_PIXEL *) Blt->Image.Bitmap,
|
(EFI_UGA_PIXEL *) Blt->Image.Bitmap,
|
||||||
EfiUgaBltBufferToVideo,
|
EfiUgaBltBufferToVideo,
|
||||||
This->Mode->CursorColumn * GLYPH_WIDTH + Private->ModeData[This->Mode->Mode].DeltaX,
|
This->Mode->CursorColumn * EFI_GLYPH_WIDTH + Private->ModeData[This->Mode->Mode].DeltaX,
|
||||||
(This->Mode->CursorRow) * GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
|
(This->Mode->CursorRow) * EFI_GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
|
||||||
This->Mode->CursorColumn * GLYPH_WIDTH + Private->ModeData[This->Mode->Mode].DeltaX,
|
This->Mode->CursorColumn * EFI_GLYPH_WIDTH + Private->ModeData[This->Mode->Mode].DeltaX,
|
||||||
(This->Mode->CursorRow) * GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
|
(This->Mode->CursorRow) * EFI_GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
|
||||||
RowInfoArray[0].LineWidth,
|
RowInfoArray[0].LineWidth,
|
||||||
RowInfoArray[0].LineHeight,
|
RowInfoArray[0].LineHeight,
|
||||||
Blt->Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
Blt->Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||||
|
@ -1812,7 +1812,7 @@ EraseCursor (
|
||||||
EFI_UGA_DRAW_PROTOCOL *UgaDraw;
|
EFI_UGA_DRAW_PROTOCOL *UgaDraw;
|
||||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Foreground;
|
EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Foreground;
|
||||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Background;
|
EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Background;
|
||||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION BltChar[GLYPH_HEIGHT][GLYPH_WIDTH];
|
EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION BltChar[EFI_GLYPH_HEIGHT][EFI_GLYPH_WIDTH];
|
||||||
UINTN X;
|
UINTN X;
|
||||||
UINTN Y;
|
UINTN Y;
|
||||||
|
|
||||||
|
@ -1832,8 +1832,8 @@ EraseCursor (
|
||||||
//
|
//
|
||||||
// Blt a character to the screen
|
// Blt a character to the screen
|
||||||
//
|
//
|
||||||
GlyphX = (CurrentMode->CursorColumn * GLYPH_WIDTH) + Private->ModeData[CurrentMode->Mode].DeltaX;
|
GlyphX = (CurrentMode->CursorColumn * EFI_GLYPH_WIDTH) + Private->ModeData[CurrentMode->Mode].DeltaX;
|
||||||
GlyphY = (CurrentMode->CursorRow * GLYPH_HEIGHT) + Private->ModeData[CurrentMode->Mode].DeltaY;
|
GlyphY = (CurrentMode->CursorRow * EFI_GLYPH_HEIGHT) + Private->ModeData[CurrentMode->Mode].DeltaY;
|
||||||
if (GraphicsOutput != NULL) {
|
if (GraphicsOutput != NULL) {
|
||||||
GraphicsOutput->Blt (
|
GraphicsOutput->Blt (
|
||||||
GraphicsOutput,
|
GraphicsOutput,
|
||||||
|
@ -1843,9 +1843,9 @@ EraseCursor (
|
||||||
GlyphY,
|
GlyphY,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
GLYPH_WIDTH,
|
EFI_GLYPH_WIDTH,
|
||||||
GLYPH_HEIGHT,
|
EFI_GLYPH_HEIGHT,
|
||||||
GLYPH_WIDTH * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
EFI_GLYPH_WIDTH * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||||
);
|
);
|
||||||
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
UgaDraw->Blt (
|
UgaDraw->Blt (
|
||||||
|
@ -1856,9 +1856,9 @@ EraseCursor (
|
||||||
GlyphY,
|
GlyphY,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
GLYPH_WIDTH,
|
EFI_GLYPH_WIDTH,
|
||||||
GLYPH_HEIGHT,
|
EFI_GLYPH_HEIGHT,
|
||||||
GLYPH_WIDTH * sizeof (EFI_UGA_PIXEL)
|
EFI_GLYPH_WIDTH * sizeof (EFI_UGA_PIXEL)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1867,10 +1867,10 @@ EraseCursor (
|
||||||
//
|
//
|
||||||
// Convert Monochrome bitmap of the Glyph to BltBuffer structure
|
// Convert Monochrome bitmap of the Glyph to BltBuffer structure
|
||||||
//
|
//
|
||||||
for (Y = 0; Y < GLYPH_HEIGHT; Y++) {
|
for (Y = 0; Y < EFI_GLYPH_HEIGHT; Y++) {
|
||||||
for (X = 0; X < GLYPH_WIDTH; X++) {
|
for (X = 0; X < EFI_GLYPH_WIDTH; X++) {
|
||||||
if ((mCursorGlyph.GlyphCol1[Y] & (1 << X)) != 0) {
|
if ((mCursorGlyph.GlyphCol1[Y] & (1 << X)) != 0) {
|
||||||
BltChar[Y][GLYPH_WIDTH - X - 1].Raw ^= Foreground.Raw;
|
BltChar[Y][EFI_GLYPH_WIDTH - X - 1].Raw ^= Foreground.Raw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1884,9 +1884,9 @@ EraseCursor (
|
||||||
0,
|
0,
|
||||||
GlyphX,
|
GlyphX,
|
||||||
GlyphY,
|
GlyphY,
|
||||||
GLYPH_WIDTH,
|
EFI_GLYPH_WIDTH,
|
||||||
GLYPH_HEIGHT,
|
EFI_GLYPH_HEIGHT,
|
||||||
GLYPH_WIDTH * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
EFI_GLYPH_WIDTH * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||||
);
|
);
|
||||||
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
UgaDraw->Blt (
|
UgaDraw->Blt (
|
||||||
|
@ -1897,9 +1897,9 @@ EraseCursor (
|
||||||
0,
|
0,
|
||||||
GlyphX,
|
GlyphX,
|
||||||
GlyphY,
|
GlyphY,
|
||||||
GLYPH_WIDTH,
|
EFI_GLYPH_WIDTH,
|
||||||
GLYPH_HEIGHT,
|
EFI_GLYPH_HEIGHT,
|
||||||
GLYPH_WIDTH * sizeof (EFI_UGA_PIXEL)
|
EFI_GLYPH_WIDTH * sizeof (EFI_UGA_PIXEL)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,12 +169,6 @@ GraphicsConsoleComponentNameGetControllerName (
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Glyph database
|
|
||||||
//
|
|
||||||
//#define GLYPH_WIDTH 8
|
|
||||||
//#define GLYPH_HEIGHT 19
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// User can define valid graphic resolution here
|
// User can define valid graphic resolution here
|
||||||
// e.g. 640x480, 800x600, 1024x768...
|
// e.g. 640x480, 800x600, 1024x768...
|
||||||
|
|
Loading…
Reference in New Issue