wlserver: get wlr_buffer from VulkanWlrTexture_t
This side-steps wlr_client_buffer and ensures we get access to the underlying buffer. This allows us to call wlr_buffer_begin_data_ptr_access to upload shm textures.
This commit is contained in:
parent
0bbecd7e90
commit
ae7fcc5ba7
1 changed files with 3 additions and 2 deletions
|
@ -79,12 +79,13 @@ extern const struct wlr_surface_role xwayland_surface_role;
|
||||||
void xwayland_surface_role_commit(struct wlr_surface *wlr_surface) {
|
void xwayland_surface_role_commit(struct wlr_surface *wlr_surface) {
|
||||||
assert(wlr_surface->role == &xwayland_surface_role);
|
assert(wlr_surface->role == &xwayland_surface_role);
|
||||||
|
|
||||||
if ( wlr_surface->buffer == NULL )
|
VulkanWlrTexture_t *tex = (VulkanWlrTexture_t *) wlr_surface_get_texture( wlr_surface );
|
||||||
|
if ( tex == NULL )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_buffer *buf = wlr_buffer_lock( &wlr_surface->buffer->base );
|
struct wlr_buffer *buf = wlr_buffer_lock( tex->buf );
|
||||||
|
|
||||||
gpuvis_trace_printf( "xwayland_surface_role_commit wlr_surface %p", wlr_surface );
|
gpuvis_trace_printf( "xwayland_surface_role_commit wlr_surface %p", wlr_surface );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue