summaryrefslogtreecommitdiff
path: root/tests/kms_plane_scaling.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-02-01 12:48:45 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-02-01 13:18:31 +0100
commitbe2f6fc1cba25372837daed6cec19107d44d3eb5 (patch)
treec44bd208a21616c7575e96c4a5562a340a5baf61 /tests/kms_plane_scaling.c
parent6095e218e44578fc9bee1d01cebf7064f2fa0c27 (diff)
lib/igt_fb: Add igt_put_cairo_ctx as counter to igt_get_cairo_ctx
This will allow support for NV12 in the future, where igt_get_cairo_ctx will return a RGB image to draw with, which will be converted in igt_put_cairo_ctx so tests don't have to add special support for NV12. This is the same as cairo_destroy + checking for errors, but not all tests use this correctly so it's better to have a single handler for it. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests/kms_plane_scaling.c')
-rw-r--r--tests/kms_plane_scaling.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index c8283a3b..d32f3441 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -120,8 +120,7 @@ static void paint_fb(data_t *d, struct igt_fb *fb)
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_assert(cairo_status(cr) == 0);
- cairo_destroy(cr);
+ igt_put_cairo_ctx(d->drm_fd, fb, cr);
}
static void check_scaling_pipe_plane_rot(data_t *d, igt_plane_t *plane,