summaryrefslogtreecommitdiff
path: root/lib/igt_fb.h
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 /lib/igt_fb.h
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 'lib/igt_fb.h')
-rw-r--r--lib/igt_fb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index d30a7340..3004f065 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -131,6 +131,7 @@ uint64_t igt_fb_tiling_to_mod(uint64_t tiling);
cairo_surface_t *igt_get_cairo_surface(int fd, struct igt_fb *fb);
cairo_surface_t *igt_cairo_image_surface_create_from_png(const char *filename);
cairo_t *igt_get_cairo_ctx(int fd, struct igt_fb *fb);
+void igt_put_cairo_ctx(int fd, struct igt_fb *fb, cairo_t *cr);
void igt_paint_color(cairo_t *cr, int x, int y, int w, int h,
double r, double g, double b);
void igt_paint_color_alpha(cairo_t *cr, int x, int y, int w, int h,