From 5b113d323dde18ef3bbae2f57d613be4ab7eb267 Mon Sep 17 00:00:00 2001 From: Ville Syrjälä Date: Thu, 17 Dec 2015 01:39:31 +0200 Subject: lib: Extract some common fb create+fill methods into helpers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several tests do one or more of the following: * igt_create_fb() + igt_paint_test_pattern() * igt_create_color_fb() + igt_paint_test_pattern() * igt_create_fb() + igt_paint_image() Extract them into new helpers: igt_create_pattern_fb(), igt_create_color_pattern_fb(), igt_create_image_fb(). v2: Fix typos, and improve API docs (Thomas) Signed-off-by: Ville Syrjälä --- tests/testdisplay.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tests/testdisplay.c') diff --git a/tests/testdisplay.c b/tests/testdisplay.c index 74e60b6f..ff49e23a 100644 --- a/tests/testdisplay.c +++ b/tests/testdisplay.c @@ -259,8 +259,6 @@ static void paint_output_info(struct connector *c, struct igt_fb *fb) double max_width; int i; - igt_paint_test_pattern(cr, l_width, l_height); - cairo_move_to(cr, l_width / 2, l_height / 2); /* Print connector and mode name */ @@ -353,9 +351,9 @@ set_mode(struct connector *c) width = c->mode.hdisplay; height = c->mode.vdisplay; - fb_id = igt_create_fb(drm_fd, width, height, - igt_bpp_depth_to_drm_format(bpp, depth), - tiling, &fb_info[current_fb]); + fb_id = igt_create_pattern_fb(drm_fd, width, height, + igt_bpp_depth_to_drm_format(bpp, depth), + tiling, &fb_info[current_fb]); paint_output_info(c, &fb_info[current_fb]); paint_color_key(&fb_info[current_fb]); -- cgit v1.2.3