mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-11 04:28:02 -05:00
add 10 bit color formats for drm plane
This commit is contained in:
parent
b51a73cb77
commit
b91c59b7c8
1 changed files with 7 additions and 1 deletions
|
|
@ -109,11 +109,17 @@ static bool add_plane(struct wlr_drm_backend *drm,
|
||||||
for (size_t j = 0; j < drm_plane->count_formats; ++j) {
|
for (size_t j = 0; j < drm_plane->count_formats; ++j) {
|
||||||
uint32_t fmt = drm_plane->formats[j];
|
uint32_t fmt = drm_plane->formats[j];
|
||||||
|
|
||||||
if (fmt == DRM_FORMAT_XRGB2101010) {
|
if (fmt == DRM_FORMAT_ARGB2101010) {
|
||||||
|
// Prefer formats with 10 bit color
|
||||||
|
// and/or alhpa channel.
|
||||||
|
rgb_format = fmt;
|
||||||
|
break;
|
||||||
|
} else if (fmt == DRM_FORMAT_XRGB2101010) {
|
||||||
rgb_format = fmt;
|
rgb_format = fmt;
|
||||||
break;
|
break;
|
||||||
} else if (fmt == DRM_FORMAT_ARGB8888) {
|
} else if (fmt == DRM_FORMAT_ARGB8888) {
|
||||||
rgb_format = fmt;
|
rgb_format = fmt;
|
||||||
|
break;
|
||||||
} else if (fmt == DRM_FORMAT_XRGB8888) {
|
} else if (fmt == DRM_FORMAT_XRGB8888) {
|
||||||
rgb_format = fmt;
|
rgb_format = fmt;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue