diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2018-02-01 12:48:45 +0100 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2018-02-01 13:18:31 +0100 |
commit | be2f6fc1cba25372837daed6cec19107d44d3eb5 (patch) | |
tree | c44bd208a21616c7575e96c4a5562a340a5baf61 /tests/kms_setmode.c | |
parent | 6095e218e44578fc9bee1d01cebf7064f2fa0c27 (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_setmode.c')
-rw-r--r-- | tests/kms_setmode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c index 206d3606..06241b19 100644 --- a/tests/kms_setmode.c +++ b/tests/kms_setmode.c @@ -161,7 +161,7 @@ static int paint_fb(struct igt_fb *fb, const char *test_name, crtc_str[i]); } - cairo_destroy(cr); + igt_put_cairo_ctx(drm_fd, fb, cr); return 0; } |