mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-01 22:58:40 -04:00
Fall back to cairo image backend and shm surface if we don't have cairo gl
This commit is contained in:
parent
6866856dfd
commit
d0c3b9da22
4 changed files with 331 additions and 100 deletions
|
|
@ -52,6 +52,12 @@ shm_buffer_attach(struct wl_buffer *buffer_base, struct wl_surface *surface)
|
|||
(struct wlsc_shm_buffer *) buffer_base;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, es->texture);
|
||||
|
||||
/* Unbind any EGLImage texture that may be bound, so we don't
|
||||
* overwrite it.*/
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
|
||||
0, 0, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, NULL);
|
||||
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
|
||||
buffer->base.width, buffer->base.height, 0,
|
||||
GL_BGRA_EXT, GL_UNSIGNED_BYTE, buffer->data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue