Commit 2ce23390 authored by Marius Vlad's avatar Marius Vlad
Browse files

pixel-formats: Document pixel format human-friendly conversion methods


Signed-off-by: Marius Vlad's avatarMarius Vlad <marius.vlad@collabora.com>
parent f5ca2f14
......@@ -387,6 +387,10 @@ pixel_format_get_info_shm(uint32_t format)
return pixel_format_get_info(format);
}
/** Retrive a pixel format information structure from a DRM FOURCC format
*
* \param format a DRM FOURCC format
*/
WL_EXPORT const struct pixel_format_info *
pixel_format_get_info(uint32_t format)
{
......@@ -427,6 +431,15 @@ pixel_format_is_opaque(const struct pixel_format_info *info)
return !info->opaque_substitute;
}
/** Retrieve the opaque substitute for a pixel format
*
* If the given pixel format contains an alpha channel, look up an identical
* pixel format except where the alpha channel is ignored, if such format
* exists. Otherwise returns the passed in format as is.
*
* \param info a pixel_format_info already retrieved using pixel_format_get_info()
*
*/
WL_EXPORT const struct pixel_format_info *
pixel_format_get_opaque_substitute(const struct pixel_format_info *info)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment