diff options
author | Carlos Santa <carlos.santa@intel.com> | 2018-02-12 16:29:59 -0800 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2018-02-20 13:35:45 +0100 |
commit | 239305a77a7bed35fdda9c3c7746a83da1f0a2f4 (patch) | |
tree | 571fd421a01da07d33020baf0b779fbc2f750c15 /tests | |
parent | df09cb52fc81db003e80ba9a02556e6f117510e2 (diff) |
tests/kms_plane_scaling: Use existing igt_kms apis to paint the fb
itg_kms already defines an api that creates and colors a new fb, let's
use that instead of recreating that all over again.
Signed-off-by: Carlos Santa <carlos.santa@intel.com>
CC: Jyoti Yadav <jyoti.r.yadav@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/kms_plane_scaling.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c index 7a547010..4408e5ce 100644 --- a/tests/kms_plane_scaling.c +++ b/tests/kms_plane_scaling.c @@ -114,15 +114,6 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe, igt_display_commit2(display, COMMIT_ATOMIC); } -static void paint_fb(data_t *d, struct igt_fb *fb) -{ - cairo_t *cr; - - cr = igt_get_cairo_ctx(d->drm_fd, fb); - igt_paint_color(cr, 0, 0, fb->width, fb->height, 0.0, 1.0, 0.0); - igt_put_cairo_ctx(d->drm_fd, fb, cr); -} - static void check_scaling_pipe_plane_rot(data_t *d, igt_plane_t *plane, uint32_t pixel_format, uint64_t tiling, enum pipe pipe, @@ -140,9 +131,8 @@ static void check_scaling_pipe_plane_rot(data_t *d, igt_plane_t *plane, /* create buffer in the range of min and max source side limit.*/ width = height = 9; - igt_create_fb(display->drm_fd, width, height, - pixel_format, tiling, &d->fb[0]); - paint_fb(d, &d->fb[0]); + igt_create_color_fb(display->drm_fd, width, height, + pixel_format, tiling, 0.0, 1.0, 0.0, &d->fb[0]); igt_plane_set_fb(plane, &d->fb[0]); /* Check min to full resolution upscaling */ |