aboutsummaryrefslogtreecommitdiff
path: root/test/dm
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-01-14 18:10:37 -0700
committerAnatolij Gustschin <agust@denx.de>2016-01-30 10:53:26 +0100
commitf266178698307608ee23741e69b9626196e66481 (patch)
treecee098f37679faf65c38592bb1e8f212fa78885f /test/dm
parent6e42e251964d79117f4b3d16a2352083037a251c (diff)
downloadu-boot-f266178698307608ee23741e69b9626196e66481.zip
u-boot-f266178698307608ee23741e69b9626196e66481.tar.gz
u-boot-f266178698307608ee23741e69b9626196e66481.tar.bz2
video: Use fractional units for X coordinates
With anti-aliased fonts we need a more fine-grained horizontal position than a single pixel. Characters can be positioned to start part-way through a pixel, with anti-aliasing (greyscale edges) taking care of the visual effect. To cope with this, use fractional units (1/256 pixel) for horizontal positions in the text console. Signed-off-by: Simon Glass <sjg@chromium.org> [agust: rebased] Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'test/dm')
-rw-r--r--test/dm/video.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/dm/video.c b/test/dm/video.c
index 9f5e7fc..be94633 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -106,14 +106,14 @@ static int dm_test_video_text(struct unit_test_state *uts)
ut_asserteq(46, compress_frame_buffer(dev));
for (i = 0; i < 20; i++)
- vidconsole_putc_xy(con, i * 8, 0, ' ' + i);
+ vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i);
ut_asserteq(273, compress_frame_buffer(dev));
vidconsole_set_row(con, 0, WHITE);
ut_asserteq(46, compress_frame_buffer(dev));
for (i = 0; i < 20; i++)
- vidconsole_putc_xy(con, i * 8, 0, ' ' + i);
+ vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i);
ut_asserteq(273, compress_frame_buffer(dev));
return 0;