mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -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
|
|
@ -157,11 +157,8 @@ bool drm_plane_pick_render_format(struct wlr_drm_plane *plane,
|
|||
|
||||
uint32_t format = DRM_FORMAT_ARGB8888;
|
||||
if (!wlr_drm_format_set_get(&plane->formats, format)) {
|
||||
const struct wlr_pixel_format_info *format_info =
|
||||
drm_get_pixel_format_info(format);
|
||||
assert(format_info != NULL &&
|
||||
format_info->opaque_substitute != DRM_FORMAT_INVALID);
|
||||
format = format_info->opaque_substitute;
|
||||
format = pixel_format_get_opaque_substitute(format);
|
||||
assert(format != DRM_FORMAT_INVALID);
|
||||
}
|
||||
|
||||
const struct wlr_drm_format *render_format =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue