mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-13 08:22:16 -04:00
render/pixel_format: add pixel_format_get_opaque_substitute()
We'll soon move opaque substitutes outside of the format table. Prepare the work by introducing a separate function to get this piece of information.
This commit is contained in:
parent
f295d0322a
commit
2d95d8d292
4 changed files with 20 additions and 10 deletions
|
|
@ -372,3 +372,11 @@ bool pixel_format_is_ycbcr(uint32_t format) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t pixel_format_get_opaque_substitute(uint32_t fmt) {
|
||||
const struct wlr_pixel_format_info *info = drm_get_pixel_format_info(fmt);
|
||||
if (info == NULL) {
|
||||
return DRM_FORMAT_INVALID;
|
||||
}
|
||||
return info->opaque_substitute;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue