For a pbuffer EGLSurface, assume that EGL swap behavior is "preserved" which means buffer age is always 1 (after the very first eglSwapBuffers()). EGL pbuffers are always single-buffered. Mesa EGL Surfaceless platform does not seem to expose EGL_EXT_buffer_age that could have told us the same. Hence all repaints to pbuffer surfaces used to need to repaint the whole output always. This patch makes repainting only the latest damage possible. Repainting only the latest damage is required for a future test on output damage regions: "tests: add output damage test". Technically, setting buffer_age to 1 is not correct before the very first eglSwapBuffers(), but to keep the code simpler I chose to rely on a newly enabled output always having full damage anyway. Checking that EGL_SWAP_BEHAVIOR is EGL_BUFFER_PRESERVED would do too. Unfortunately, Mesa seems to return EGL_BUFFER_DESTROYED, so I cannot fail the headless-backend in that check. Even so, the output damage test actually succeeds. See also: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4278 Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>dev
parent
b4f91edb5e
commit
1e365c8c4c
Loading…
Reference in new issue