diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-06-04 13:39:19 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-06-04 13:39:19 +0000 |
| commit | 8b320ed29630e75c058bbf368ea5e2e9a68d0143 (patch) | |
| tree | bc35504beecb177ef1ebbb2ce4920cbe14e2f6c2 /shm.h | |
| parent | Merge branch 'clip-to-cell' (diff) | |
render: re-write cell clipping to use pixman destination clipping
Our home rolled clip-to-cell code was, obviously, not correct.
The original problem was that we couldn't use pixman clipping since we
have multiple threads writing to the same pixman image, and thus there
would be races between the threads setting clipping.
The fix is actually simple - just instantiate one pixman
image (referencing the same backing image data) for each rendering
thread.
Diffstat (limited to 'shm.h')
| -rw-r--r-- | shm.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -19,7 +19,8 @@ struct buffer { void *mmapped; /* Raw data (TODO: rename) */ struct wl_buffer *wl_buf; - pixman_image_t *pix; + pixman_image_t **pix; + size_t pix_instances; /* Internal */ int fd; /* memfd */ @@ -34,7 +35,7 @@ struct buffer { }; struct buffer *shm_get_buffer( - struct wl_shm *shm, int width, int height, unsigned long cookie, bool scrollable); + struct wl_shm *shm, int width, int height, unsigned long cookie, bool scrollable, size_t pix_instances); void shm_fini(void); void shm_set_max_pool_size(off_t max_pool_size); |
