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>
UINTN StrLength;\r
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *RowBufferPtr;\r
HII_GLOBAL_FONT_INFO *GlobalFont;\r
UINTN StrLength;\r
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *RowBufferPtr;\r
HII_GLOBAL_FONT_INFO *GlobalFont;\r
\r
//\r
// Check incoming parameters.\r
\r
//\r
// Check incoming parameters.\r
+ // Initialize the background color.\r
+ //\r
+ PreInitBkgnd = Background.Blue | Background.Green << 8 | Background.Red << 16;\r
+ SetMem32 (BltBuffer,RowInfo[RowIndex].LineWidth * RowInfo[RowIndex].LineHeight * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL),PreInitBkgnd);\r
+ //\r
// Set BufferPtr to Origin by adding baseline to the starting position.\r
//\r
BufferPtr = BltBuffer + BaseLine * RowInfo[RowIndex].LineWidth;\r
// Set BufferPtr to Origin by adding baseline to the starting position.\r
//\r
BufferPtr = BltBuffer + BaseLine * RowInfo[RowIndex].LineWidth;\r