mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-10 05:33:51 -04:00
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.
This commit is contained in:
parent
0d0df56796
commit
8b320ed296
3 changed files with 62 additions and 60 deletions
5
shm.h
5
shm.h
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue