mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-21 06:46:46 -04:00
Nuke wlr_client_buffer
This abstraction is incompatible with wlr_raster in every way, let's just use the client submitted buffers directly. This will regress a couple of things until wlr_raster has been fully integrated.
This commit is contained in:
parent
d8def1aa65
commit
ba8230b00a
9 changed files with 21 additions and 203 deletions
|
|
@ -132,50 +132,9 @@ bool wlr_buffer_begin_data_ptr_access(struct wlr_buffer *buffer, uint32_t flags,
|
|||
void **data, uint32_t *format, size_t *stride);
|
||||
void wlr_buffer_end_data_ptr_access(struct wlr_buffer *buffer);
|
||||
|
||||
/**
|
||||
* A client buffer.
|
||||
*/
|
||||
struct wlr_client_buffer {
|
||||
struct wlr_buffer base;
|
||||
|
||||
/**
|
||||
* The buffer's texture, if any. A buffer will not have a texture if the
|
||||
* client destroys the buffer before it has been released.
|
||||
*/
|
||||
struct wlr_texture *texture;
|
||||
/**
|
||||
* The buffer this client buffer was created from. NULL if destroyed.
|
||||
*/
|
||||
struct wlr_buffer *source;
|
||||
|
||||
// private state
|
||||
|
||||
struct wl_listener source_destroy;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a struct wlr_client_buffer from a given struct wlr_buffer by creating
|
||||
* a texture from it, and copying its struct wl_resource.
|
||||
*/
|
||||
struct wlr_client_buffer *wlr_client_buffer_create(struct wlr_buffer *buffer,
|
||||
struct wlr_renderer *renderer);
|
||||
|
||||
/**
|
||||
* Get a client buffer from a generic buffer. If the buffer isn't a client
|
||||
* buffer, returns NULL.
|
||||
*/
|
||||
struct wlr_client_buffer *wlr_client_buffer_get(struct wlr_buffer *buffer);
|
||||
/**
|
||||
* Check if a resource is a wl_buffer resource.
|
||||
*/
|
||||
bool wlr_resource_is_buffer(struct wl_resource *resource);
|
||||
/**
|
||||
* Try to update the buffer's content.
|
||||
*
|
||||
* Fails if there's more than one reference to the buffer or if the texture
|
||||
* isn't mutable.
|
||||
*/
|
||||
bool wlr_client_buffer_apply_damage(struct wlr_client_buffer *client_buffer,
|
||||
struct wlr_buffer *next, pixman_region32_t *damage);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -89,13 +89,6 @@ struct wlr_surface_output {
|
|||
struct wlr_surface {
|
||||
struct wl_resource *resource;
|
||||
struct wlr_renderer *renderer;
|
||||
/**
|
||||
* The surface's buffer, if any. A surface has an attached buffer when it
|
||||
* commits with a non-null buffer in its pending state. A surface will not
|
||||
* have a buffer if it has never committed one, has committed a null buffer,
|
||||
* or something went wrong with uploading the buffer.
|
||||
*/
|
||||
struct wlr_client_buffer *buffer;
|
||||
/**
|
||||
* The buffer position, in surface-local units.
|
||||
*/
|
||||
|
|
@ -199,13 +192,6 @@ bool wlr_surface_set_role(struct wlr_surface *surface,
|
|||
*/
|
||||
bool wlr_surface_has_buffer(struct wlr_surface *surface);
|
||||
|
||||
/**
|
||||
* Get the texture of the buffer currently attached to this surface. Returns
|
||||
* NULL if no buffer is currently attached or if something went wrong with
|
||||
* uploading the buffer.
|
||||
*/
|
||||
struct wlr_texture *wlr_surface_get_texture(struct wlr_surface *surface);
|
||||
|
||||
/**
|
||||
* Get the root of the subsurface tree for this surface. Can return NULL if
|
||||
* a surface in the tree has been destroyed.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue