This commit is contained in:
DerVerruckteFuchs 2020-04-22 17:55:40 -04:00
parent b61a98c417
commit d91a464552
2 changed files with 4 additions and 3 deletions

View file

@ -109,10 +109,11 @@ static bool add_plane(struct wlr_drm_backend *drm,
for (size_t j = 0; j < drm_plane->count_formats; ++j) {
uint32_t fmt = drm_plane->formats[j];
if (fmt == DRM_FORMAT_ARGB8888) {
// Prefer formats with alpha channel
if (fmt == DRM_FORMAT_XRGB2101010) {
rgb_format = fmt;
break;
} else if (fmt == DRM_FORMAT_ARGB8888) {
rgb_format = fmt;
} else if (fmt == DRM_FORMAT_XRGB8888) {
rgb_format = fmt;
}