diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-12-17 01:39:31 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-01-08 15:01:59 +0200 |
commit | 5b113d323dde18ef3bbae2f57d613be4ab7eb267 (patch) | |
tree | cd2bc3a7b496e985bd856f2c341e553c3315ec71 /tests/testdisplay.c | |
parent | 7cb35109645e6495f67981b9930587c1ddfe4f90 (diff) |
lib: Extract some common fb create+fill methods into helpers
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ä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests/testdisplay.c')
-rw-r--r-- | tests/testdisplay.c | 8 |
1 files changed, 3 insertions, 5 deletions
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]); |