mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-12 05:34:01 -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
5
shm.h
5
shm.h
|
|
@ -65,8 +65,7 @@ enum shm_bit_depth shm_chain_bit_depth(const struct buffer_chain *chain);
|
|||
*
|
||||
* A newly allocated buffer has an age of 1234.
|
||||
*/
|
||||
struct buffer *shm_get_buffer(
|
||||
struct buffer_chain *chain, int width, int height, bool with_alpha);
|
||||
struct buffer *shm_get_buffer(struct buffer_chain *chain, int width, int height);
|
||||
/*
|
||||
* Returns many buffers, described by 'info', all sharing the same SHM
|
||||
* buffer pool.
|
||||
|
|
@ -84,7 +83,7 @@ struct buffer *shm_get_buffer(
|
|||
void shm_get_many(
|
||||
struct buffer_chain *chain, size_t count,
|
||||
int widths[static count], int heights[static count],
|
||||
struct buffer *bufs[static count], bool with_alpha);
|
||||
struct buffer *bufs[static count]);
|
||||
|
||||
void shm_did_not_use_buf(struct buffer *buf);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue