wayland: Make MetaWaylandBuffer handle texture generation itself

Desktop / GNOME / Mutter - Jonas Ådahl [gmail.com] - 17 November 2016 10:00 UTC

Don't rely on the Cogl layer having Wayland specific paths by determining the buffer type and creating the EGLImage ourself, while using the newly exposed CoglTexture from EGLImage API. This changes the API used by MetaWaylandSurface to make the MetaWaylandBuffer API be aware when the buffer is being attached. For SHM and EGL buffers, only the first time it is attached will result in a new texture being allocated, but later for EGLStream's, more logic on every attach is needed.

https://bugzilla.gnome.org/show_bug.cgi?id=773629

2345598 wayland: Make MetaWaylandBuffer handle texture generation itself
cogl/cogl/Makefile.am | 2 +-
src/wayland/meta-wayland-buffer.c | 316 ++++++++++++++++++++++++++++++------
src/wayland/meta-wayland-buffer.h | 4 +-
src/wayland/meta-wayland-surface.c | 26 ++-
4 files changed, 291 insertions(+), 57 deletions(-)

Upstream: git.gnome.org


  • Share