diff options
author | Dandan Bi <dandan.bi@intel.com> | 2016-05-31 16:44:47 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2016-06-06 14:08:31 +0800 |
commit | 0672c2cdfebd35af3e68fe0b54408852bf314759 (patch) | |
tree | 9cee5fc4a945f9c5bdb5d23b8bd8ecc3bd5f123e /MdeModulePkg/Universal | |
parent | 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49 (diff) | |
download | edk2-0672c2cdfebd35af3e68fe0b54408852bf314759.zip edk2-0672c2cdfebd35af3e68fe0b54408852bf314759.tar.gz edk2-0672c2cdfebd35af3e68fe0b54408852bf314759.tar.bz2 |
MdeModulePkg/HiiDatabase: Preinit background when render string to screen
When render string to screen, for proportional fonts,
the background color may not set to the whole BltBuffer.
And this will cause incorrect display.
Now initialize the background color to fix this issue.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/Font.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c index 56b30ff..5d31f75 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c @@ -1613,6 +1613,7 @@ HiiStringToImage ( UINTN StrLength;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *RowBufferPtr;
HII_GLOBAL_FONT_INFO *GlobalFont;
+ UINT32 PreInitBkgnd;
//
// Check incoming parameters.
@@ -2049,6 +2050,11 @@ HiiStringToImage ( goto Exit;
}
//
+ // Initialize the background color.
+ //
+ PreInitBkgnd = Background.Blue | Background.Green << 8 | Background.Red << 16;
+ SetMem32 (BltBuffer,RowInfo[RowIndex].LineWidth * RowInfo[RowIndex].LineHeight * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL),PreInitBkgnd);
+ //
// Set BufferPtr to Origin by adding baseline to the starting position.
//
BufferPtr = BltBuffer + BaseLine * RowInfo[RowIndex].LineWidth;
|