diff options
author | Erik Reider <[email protected]> | 2023-12-30 11:25:16 +0100 |
---|---|---|
committer | Erik Reider <[email protected]> | 2024-01-02 11:21:58 +0100 |
commit | 0b52aa9d137b03017313e028accc92dc5d536440 (patch) | |
tree | 06649993526e0a339fff34f0ae8b4c8ec2fa4d13 /include/types | |
parent | b929a2bbadf467864796ad4ec90882ce86cfebff (diff) |
Initial rebase without effects
Diffstat (limited to 'include/types')
-rw-r--r-- | include/types/wlr_buffer.h | 69 | ||||
-rw-r--r-- | include/types/wlr_output.h | 10 | ||||
-rw-r--r-- | include/types/wlr_scene.h | 2 |
3 files changed, 12 insertions, 69 deletions
diff --git a/include/types/wlr_buffer.h b/include/types/wlr_buffer.h index 59d78e9..016cae8 100644 --- a/include/types/wlr_buffer.h +++ b/include/types/wlr_buffer.h @@ -3,75 +3,6 @@ #include <wlr/types/wlr_buffer.h> -struct wlr_shm_client_buffer { - struct wlr_buffer base; - - uint32_t format; - size_t stride; - - // The following fields are NULL if the client has destroyed the wl_buffer - struct wl_resource *resource; - struct wl_shm_buffer *shm_buffer; - - // This is used to keep the backing storage alive after the client has - // destroyed the wl_buffer - struct wl_shm_pool *saved_shm_pool; - void *saved_data; - - struct wl_listener resource_destroy; - struct wl_listener release; -}; - -struct wlr_shm_client_buffer *shm_client_buffer_get_or_create( - struct wl_resource *resource); - -/** - * A read-only buffer that holds a data pointer. - * - * This is suitable for passing raw pixel data to a function that accepts a - * wlr_buffer. - */ -struct wlr_readonly_data_buffer { - struct wlr_buffer base; - - const void *data; - uint32_t format; - size_t stride; - - void *saved_data; -}; - -/** - * Wraps a read-only data pointer into a wlr_buffer. The data pointer may be - * accessed until readonly_data_buffer_drop() is called. - */ -struct wlr_readonly_data_buffer *readonly_data_buffer_create(uint32_t format, - size_t stride, uint32_t width, uint32_t height, const void *data); -/** - * Drops ownership of the buffer (see wlr_buffer_drop() for more details) and - * perform a copy of the data pointer if a consumer still has the buffer locked. - */ -bool readonly_data_buffer_drop(struct wlr_readonly_data_buffer *buffer); - -struct wlr_dmabuf_buffer { - struct wlr_buffer base; - struct wlr_dmabuf_attributes dmabuf; - bool saved; -}; - -/** - * Wraps a DMA-BUF into a wlr_buffer. The DMA-BUF may be accessed until - * dmabuf_buffer_drop() is called. - */ -struct wlr_dmabuf_buffer *dmabuf_buffer_create( - struct wlr_dmabuf_attributes *dmabuf); -/** - * Drops ownership of the buffer (see wlr_buffer_drop() for more details) and - * takes a reference to the DMA-BUF (by dup'ing its file descriptors) if a - * consumer still has the buffer locked. - */ -bool dmabuf_buffer_drop(struct wlr_dmabuf_buffer *buffer); - /** * Check whether a buffer is fully opaque. * diff --git a/include/types/wlr_output.h b/include/types/wlr_output.h new file mode 100644 index 0000000..b239b6a --- /dev/null +++ b/include/types/wlr_output.h @@ -0,0 +1,10 @@ +#ifndef TYPES_WLR_OUTPUT_H +#define TYPES_WLR_OUTPUT_H + +#include <wlr/render/drm_format_set.h> +#include <wlr/types/wlr_output.h> + +void output_pending_resolution(struct wlr_output *output, + const struct wlr_output_state *state, int *width, int *height); + +#endif diff --git a/include/types/wlr_scene.h b/include/types/wlr_scene.h index 64c11bc..80dcfd1 100644 --- a/include/types/wlr_scene.h +++ b/include/types/wlr_scene.h @@ -5,4 +5,6 @@ struct wlr_scene *scene_node_get_root(struct wlr_scene_node *node); +void scene_surface_set_clip(struct wlr_scene_surface *surface, struct wlr_box *clip); + #endif |