mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-21 05:33:45 -04:00
shm: don't bother with xrgb surfaces, always use argb
Before this patch, foot used xrgb surfaces for all fully opaque surfaces, and only used argb surfaces for the main window when the user enabled translucency. However, several compositors have damage-like issues when we switch between opaque and non-opaque surfaces (for example, when switching color theme, or when toggling fullscreen). Since the performance benefit of using non-alpha aware surfaces are likely minor (if there's any measurable performance difference at all!), lets workaround these compositor issues by always using argb surfaces.
This commit is contained in:
parent
42e04c5c87
commit
b78cc92322
7 changed files with 42 additions and 79 deletions
|
|
@ -240,11 +240,8 @@ shm_format(void *data, struct wl_shm *wl_shm, uint32_t format)
|
|||
struct wayland *wayl = data;
|
||||
|
||||
switch (format) {
|
||||
case WL_SHM_FORMAT_XRGB2101010: wayl->shm_have_xrgb2101010 = true; break;
|
||||
case WL_SHM_FORMAT_ARGB2101010: wayl->shm_have_argb2101010 = true; break;
|
||||
case WL_SHM_FORMAT_XBGR2101010: wayl->shm_have_xbgr2101010 = true; break;
|
||||
case WL_SHM_FORMAT_ABGR2101010: wayl->shm_have_abgr2101010 = true; break;
|
||||
case WL_SHM_FORMAT_XBGR16161616: wayl->shm_have_xbgr161616 = true; break;
|
||||
case WL_SHM_FORMAT_ABGR16161616: wayl->shm_have_abgr161616 = true; break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue