Wayland++ 1.0.0
C++ Bindings for Wayland
|
content for a wl_surface More...
#include <wayland-server-protocol.hpp>
Inherits wayland::server::resource_t.
Public Member Functions | |
std::function< void()> & | on_destroy () |
destroy a buffer | |
void | release (bool post=true) |
compositor releases buffer | |
bool | proxy_has_object () const |
Check whether this wrapper actually wraps an object. | |
void | post_no_memory () const |
uint32_t | get_id () const |
client_t | get_client () const |
unsigned int | get_version () const |
std::string | get_class () |
Static Public Attributes | |
static constexpr std::uint32_t | release_since_version = 1 |
Minimum protocol version required for the release function. | |
content for a wl_surface
A buffer provides the content for a wl_surface. Buffers are created through factory interfaces such as wl_shm, wp_linux_buffer_params (from the linux-dmabuf protocol extension) or similar. It has a width and a height and can be attached to a wl_surface, but the mechanism by which a client provides and updates the contents is defined by the buffer factory interface.
If the buffer uses a format that has an alpha channel, the alpha channel is assumed to be premultiplied in the color channels unless otherwise specified.
Definition at line 749 of file wayland-server-protocol.hpp.
|
inherited |
Retrieve the interface name (class) of a resource object.
|
inherited |
Get the associated client
|
inherited |
Get the internal ID of the resource
|
inherited |
Get interface version
std::function< void()> & buffer_t::on_destroy | ( | ) |
destroy a buffer
Destroy a buffer. If and how you need to release the backing storage is defined by the buffer factory interface.
For possible side-effects to a surface, see wl_surface.attach.
Definition at line 1806 of file wayland-server-protocol.cpp.
|
inherited |
Post "not enough memory" error to the client
If the compositor has not enough memory to fulfill a certail request of the client, this function can be called to notify the client of this circumstance.
|
inherited |
Check whether this wrapper actually wraps an object.
void buffer_t::release | ( | bool | post = true | ) |
compositor releases buffer
Sent when this wl_buffer is no longer used by the compositor. The client is now free to reuse or destroy this buffer and its backing storage.
If a client receives a release event before the frame callback requested in the same wl_surface.commit that attaches this wl_buffer to a surface, then the client is immediately free to reuse the buffer and its backing storage, and does not need a second buffer for the next surface content update. Typically this is possible, when the compositor maintains a copy of the wl_surface contents, e.g. as a GL texture. This is an important optimization for GL(ES) compositors with wl_shm clients.
Definition at line 1812 of file wayland-server-protocol.cpp.
|
staticconstexpr |
Minimum protocol version required for the release function.
Definition at line 805 of file wayland-server-protocol.hpp.