mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-30 11:11:21 -04:00
apply tadeokondrak's 10bit color patch from 'https://github.com/swaywm/wlroots/issues/1378#issuecomment-569826428'
This commit is contained in:
parent
b61a98c417
commit
d91a464552
2 changed files with 4 additions and 3 deletions
|
|
@ -109,10 +109,11 @@ 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_ARGB8888) {
|
if (fmt == DRM_FORMAT_XRGB2101010) {
|
||||||
// Prefer formats with alpha channel
|
|
||||||
rgb_format = fmt;
|
rgb_format = fmt;
|
||||||
break;
|
break;
|
||||||
|
} else if (fmt == DRM_FORMAT_ARGB8888) {
|
||||||
|
rgb_format = fmt;
|
||||||
} else if (fmt == DRM_FORMAT_XRGB8888) {
|
} else if (fmt == DRM_FORMAT_XRGB8888) {
|
||||||
rgb_format = fmt;
|
rgb_format = fmt;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ bool init_drm_renderer(struct wlr_drm_backend *drm,
|
||||||
EGL_NONE,
|
EGL_NONE,
|
||||||
};
|
};
|
||||||
|
|
||||||
renderer->gbm_format = GBM_FORMAT_ARGB8888;
|
renderer->gbm_format = GBM_FORMAT_ARGB2101010;
|
||||||
renderer->wlr_rend = create_renderer_func(&renderer->egl,
|
renderer->wlr_rend = create_renderer_func(&renderer->egl,
|
||||||
EGL_PLATFORM_GBM_MESA, renderer->gbm,
|
EGL_PLATFORM_GBM_MESA, renderer->gbm,
|
||||||
config_attribs, renderer->gbm_format);
|
config_attribs, renderer->gbm_format);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue