gl-renderer: Store EGL buffer state in weston_buffer

Introduce a renderer_private hook for weston_buffer, and use this to
store a copy of the gl_buffer_state for EGL buffers (i.e. non-dmabuf, via
EGL_WL_bind_wayland_display).

As part of this, we create the EGLImage along with the weston_buffer
information, and just take a reference to it each time it is attached.
If you have bisected a failure to update surface content to this commit,
it very likely means that your EGL implementation requires images to be
recreated rather than only rebound in order to have their content
updated, which is contrary to specification.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone
2022-01-20 16:05:03 +00:00
parent 8544a4d09b
commit 8b167a1703
2 changed files with 101 additions and 63 deletions
+1
View File
@@ -1221,6 +1221,7 @@ struct weston_buffer {
} buffer_origin;
bool direct_display;
void *renderer_private;
void *backend_private;
const struct pixel_format_info *pixel_format;