gnome-shell flickers badly with wl_shm double buffering
Applications that use multiple wl_shm buffers and that do partial updates, will flicker badly.
The wl_surface damage request "is used to describe the regions where the pending buffer is different from the current surface contents". However, gnome-shell seems to cache each buffer separately, effectively interpreting the damage as the region where the buffer is different from the last time the buffer was used.
This can be reproduced with the attached Qt application. main.cpp
I have also reproduced it with a modified version of weston-simple-shm, which is attached. The simplest way to build it is to drop it into an existing weston build and do 'make weston-simple-shm'. By default it runs double-buffered. Invoke it with an argument to run in single-buffer mode where it does not flicker. simple-shm.c