summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-11-26 17:10:44 +0100
committerDavid Herrmann <dh.herrmann@googlemail.com>2012-11-26 17:10:44 +0100
commitda7219e6de7aa17e9edef995ff7a4fb119819589 (patch)
treed1dea05ab51356b162b0f558e0237278b1946075 /tests
parent5f234e65927f8b4e2949272f7c96955d9513a1b4 (diff)
test_output: use uterm_display directly
uterm_screen is scheduled for removal so use the display API directly. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_output.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/tests/test_output.c b/tests/test_output.c
index fef617f..a127d92 100644
--- a/tests/test_output.c
+++ b/tests/test_output.c
@@ -64,7 +64,7 @@ static int blit_outputs(struct uterm_video *video)
{
struct uterm_display *iter;
int j, ret;
- struct uterm_screen *screen;
+ struct uterm_mode *mode;
j = 0;
iter = uterm_video_get_displays(video);
@@ -88,30 +88,22 @@ static int blit_outputs(struct uterm_video *video)
if (uterm_display_get_state(iter) != UTERM_DISPLAY_ACTIVE)
continue;
- ret = uterm_screen_new_single(&screen, iter);
- if (ret) {
- log_err("Cannot create temp-screen object: %d", ret);
- continue;
- }
-
- ret = uterm_screen_fill(screen, 0xff, 0xff, 0xff, 0, 0,
- uterm_screen_width(screen),
- uterm_screen_height(screen));
+ mode = uterm_display_get_current(iter);
+ ret = uterm_display_fill(iter, 0xff, 0xff, 0xff, 0, 0,
+ uterm_mode_get_width(mode),
+ uterm_mode_get_height(mode));
if (ret) {
log_err("cannot fill framebuffer");
- uterm_screen_unref(screen);
continue;
}
- ret = uterm_screen_swap(screen);
+ ret = uterm_display_swap(iter);
if (ret) {
log_err("Cannot swap screen: %d", ret);
- uterm_screen_unref(screen);
continue;
}
log_notice("Successfully set screen on display %p", iter);
- uterm_screen_unref(screen);
}
log_notice("Waiting 5 seconds...");