diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2016-01-26 10:52:29 -0200 |
---|---|---|
committer | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2016-01-29 16:30:15 -0200 |
commit | 7ca55f433c1e1fa722a46d1303524579581d6037 (patch) | |
tree | 48b74836b31c0f79225273714b545763a6a6cbfd /lib/igt_fb.h | |
parent | 55229f173e00947ecc05747a9038289940e30340 (diff) |
tests/igt_fb: rename igt_get_all_formats to igt_get_all_cairo_formats
I recently had this discussion with Daniel where I didn't want to use
igt_drm_format_to_bpp() because it uses the format_desc array, and
igt_fb currently assumes that all the format_desc formats have a
matching valid Cairo format, so I wouldn't be able to easily add
formats such as ARGB2101010.
The function that has the assumption mentioned above is
igt_get_all_formats: its current users call igt_get_all_formats, and
then call cairo-dependent functions, such as igt_get_cairo_ctx on the
returned formats.
In order to document the current behavior and prevent any problems in
case we start adding new formats without matching Cairo versions to
format_desc, rename igt_get_all_formats to igt_get_all_cairo_formats
and make it explicitly check for CAIRO_FORMAT_INVALID.
Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.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 064027cb..4e6a7694 100644 --- a/lib/igt_fb.h +++ b/lib/igt_fb.h @@ -117,7 +117,7 @@ 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_formats(const uint32_t **formats, int *format_count); +void igt_get_all_cairo_formats(const uint32_t **formats, int *format_count); #endif /* __IGT_FB_H__ */ |