mirror of
https://github.com/brl/mutter.git
synced 2025-08-05 08:04:50 +00:00
wayland: Add single pixel buffer support
The "single pixel buffer" Wayland protocol extension provides a way for clients to create 1x1 buffers with a single color, specified by providing the color channels (red, green and blue) as well as the alpha channel as a 32 bit unsigned integer. For now, this is turned into a 1x1 texture. Future potential improvements is to hook things up to the scanout candidate logic and turn it into a scanout capable DMA buffer. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2246>
This commit is contained in:
@@ -780,8 +780,10 @@ meta_wayland_surface_apply_state (MetaWaylandSurface *surface,
|
||||
* it until is replaced by a subsequent wl_surface.commit or when the
|
||||
* wl_surface is destroyed.
|
||||
*/
|
||||
surface->buffer_held = (state->buffer &&
|
||||
!wl_shm_buffer_get (state->buffer->resource));
|
||||
surface->buffer_held =
|
||||
(state->buffer &&
|
||||
(state->buffer->type != META_WAYLAND_BUFFER_TYPE_SHM &&
|
||||
state->buffer->type != META_WAYLAND_BUFFER_TYPE_SINGLE_PIXEL));
|
||||
}
|
||||
|
||||
if (state->scale > 0)
|
||||
|
Reference in New Issue
Block a user