mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-14 06:59:43 -05:00
wlr_scene: Allow buffer in wlr_scene_buffer to be NULL
This is useful to emulate an unmapped surface.
This commit is contained in:
parent
8fe3aa29da
commit
039a31df9a
2 changed files with 11 additions and 2 deletions
|
|
@ -107,6 +107,8 @@ struct wlr_scene_rect {
|
|||
/** A scene-graph node displaying a buffer */
|
||||
struct wlr_scene_buffer {
|
||||
struct wlr_scene_node node;
|
||||
|
||||
// May be NULL
|
||||
struct wlr_buffer *buffer;
|
||||
|
||||
// private state
|
||||
|
|
@ -267,6 +269,8 @@ void wlr_scene_rect_set_color(struct wlr_scene_rect *rect, const float color[sta
|
|||
|
||||
/**
|
||||
* Add a node displaying a buffer to the scene-graph.
|
||||
*
|
||||
* If the buffer is NULL, this node will not be displayed.
|
||||
*/
|
||||
struct wlr_scene_buffer *wlr_scene_buffer_create(struct wlr_scene_node *parent,
|
||||
struct wlr_buffer *buffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue