diff options
author | Paul Kocialkowski <paul.kocialkowski@linux.intel.com> | 2017-07-19 16:46:04 +0300 |
---|---|---|
committer | Lyude <lyude@redhat.com> | 2017-07-19 12:02:36 -0400 |
commit | b4ad397e1741529aade88c4421430c12f0eaf209 (patch) | |
tree | 5693f33378b74bc5dbbf2bd0d160fa0e92fdcfe7 /lib/igt_fb.h | |
parent | fb1ddc47003ad6a683db79beeb81b6cbab1feb7c (diff) |
lib/igt_fb: Export the cairo surface instead of writing to a png
This removes the igt_write_fb_to_png function (that was unused thus far)
and exports the igt_get_cairo_surface function to grab the matching
cairo surface. Writing to a png is now handled by the common frame
handling code in lib/igt_frame.
This also fixes how the surface is retreived in chamelium code,
which avoids destroying it too early.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude <lyude@redhat.com>
Diffstat (limited to 'lib/igt_fb.h')
-rw-r--r-- | lib/igt_fb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/igt_fb.h b/lib/igt_fb.h index 4a680cef..f8a845cc 100644 --- a/lib/igt_fb.h +++ b/lib/igt_fb.h @@ -132,6 +132,7 @@ int igt_create_bo_with_dimensions(int fd, int width, int height, uint32_t format uint64_t igt_fb_mod_to_tiling(uint64_t modifier); /* cairo-based painting */ +cairo_surface_t *igt_get_cairo_surface(int fd, struct igt_fb *fb); cairo_t *igt_get_cairo_ctx(int fd, struct igt_fb *fb); void igt_paint_color(cairo_t *cr, int x, int y, int w, int h, double r, double g, double b); @@ -145,7 +146,6 @@ void igt_paint_color_gradient_range(cairo_t *cr, int x, int y, int w, int h, void igt_paint_test_pattern(cairo_t *cr, int width, int height); void igt_paint_image(cairo_t *cr, const char *filename, int dst_x, int dst_y, int dst_width, int dst_height); -void igt_write_fb_to_png(int fd, struct igt_fb *fb, const char *filename); int igt_cairo_printf_line(cairo_t *cr, enum igt_text_align align, double yspacing, const char *fmt, ...) __attribute__((format (printf, 4, 5))); |