提交 a202c5bd 编写于 作者: H Hannes Petermaier 提交者: Anatolij Gustschin

common/lcd_console: ask only one-time for bg/fg-color per call

Don't call the lcd_getfgcolor and lcd_getbgcolor within the "draw-loop", this
only wastes time.
Signed-off-by: NHannes Petermaier <hannes.petermaier@br-automation.com>
Signed-off-by: NHannes Petermaier <oe5hpm@oevsv.at>
Acked-by: NNikita Kiryanov <nikita@compulab.co.il>
上级 97562c12
......@@ -59,7 +59,8 @@ static void lcd_putc_xy(ushort x, ushort y, char c)
{
uchar *dest;
ushort row;
int fg_color, bg_color;
int fg_color = lcd_getfgcolor();
int bg_color = lcd_getbgcolor();
int i;
dest = (uchar *)(lcd_console_address +
......@@ -73,10 +74,6 @@ static void lcd_putc_xy(ushort x, ushort y, char c)
#else
uchar *d = dest;
#endif
fg_color = lcd_getfgcolor();
bg_color = lcd_getbgcolor();
uchar bits;
bits = video_fontdata[c * VIDEO_FONT_HEIGHT + row];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册