From d311e9aaa6ca137391b590d8093e53af7059ee0c Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Fri, 2 Feb 2018 11:35:45 +0100 Subject: lib/igt_fb: Remove igt_get_all_cairo_formats() All users have been converted to igt_fb_supported_format(), I don't think there's a valid use left for this. Signed-off-by: Maarten Lankhorst Reviewed-by: Mika Kahola Tested-by: Vidya Srinivas --- lib/igt_fb.c | 33 --------------------------------- lib/igt_fb.h | 1 - 2 files changed, 34 deletions(-) diff --git a/lib/igt_fb.c b/lib/igt_fb.c index 0389b1c1..ecd73053 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -1687,39 +1687,6 @@ const char *igt_format_str(uint32_t drm_format) return f ? f->name : "invalid"; } -/** - * igt_get_all_cairo_formats: - * @formats: pointer to pointer to store the allocated formats array - * @format_count: pointer to integer to store the size of the allocated array - * - * This functions returns an array of all the drm fourcc codes supported by - * cairo and this library. - */ -void igt_get_all_cairo_formats(const uint32_t **formats, int *format_count) -{ - static uint32_t *drm_formats; - static int n_formats; - - if (!drm_formats) { - struct format_desc_struct *f; - uint32_t *format; - - n_formats = 0; - for_each_format(f) - if (f->cairo_id != CAIRO_FORMAT_INVALID) - n_formats++; - - drm_formats = calloc(n_formats, sizeof(*drm_formats)); - format = &drm_formats[0]; - for_each_format(f) - if (f->cairo_id != CAIRO_FORMAT_INVALID) - *format++ = f->drm_id; - } - - *formats = drm_formats; - *format_count = n_formats; -} - /** * igt_fb_supported_format: * @drm_format: drm fourcc to test. diff --git a/lib/igt_fb.h b/lib/igt_fb.h index a6ce0789..023b069d 100644 --- a/lib/igt_fb.h +++ b/lib/igt_fb.h @@ -162,7 +162,6 @@ int igt_cairo_printf_line(cairo_t *cr, enum igt_text_align align, uint32_t igt_bpp_depth_to_drm_format(int bpp, int depth); uint32_t igt_drm_format_to_bpp(uint32_t drm_format); const char *igt_format_str(uint32_t drm_format); -void igt_get_all_cairo_formats(const uint32_t **formats, int *format_count); bool igt_fb_supported_format(uint32_t drm_format); #endif /* __IGT_FB_H__ */ -- cgit v1.2.3