Files
weston/libweston
Pekka Paalanen 1e365c8c4c gl-renderer: assume pbuffers preserve contents
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>
2021-02-25 12:47:07 +02:00
..
2020-01-29 09:49:41 +00:00
2020-01-29 09:49:41 +00:00
2020-01-29 09:49:41 +00:00
2021-02-24 10:01:17 -05:00
2021-02-24 10:01:17 -05:00
2018-12-09 14:50:54 +02:00
2020-01-29 09:49:41 +00:00
2020-01-29 09:49:41 +00:00
2021-02-24 10:01:17 -05:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2021-02-24 10:01:17 -05:00