mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-22 05:33:45 -04:00
shm: discard shm buffers with mis-matching alpha-setting
This commit is contained in:
parent
c45231ef89
commit
795e39de1a
2 changed files with 5 additions and 1 deletions
4
shm.c
4
shm.c
|
|
@ -564,7 +564,9 @@ shm_get_buffer(struct buffer_chain *chain, int width, int height, bool with_alph
|
|||
tll_foreach(chain->bufs, it) {
|
||||
struct buffer_private *buf = it->item;
|
||||
|
||||
if (buf->public.width != width || buf->public.height != height) {
|
||||
if (buf->public.width != width || buf->public.height != height ||
|
||||
with_alpha != buf->with_alpha)
|
||||
{
|
||||
LOG_DBG("purging mismatching buffer %p", (void *)buf);
|
||||
if (buffer_unref_no_remove_from_chain(buf))
|
||||
tll_remove(chain->bufs, it);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue