|
Ream v0.1.0-1
C++ graphics library for Linux
|
Raster (software) implementation of RWLSwapchain. More...
#include <RRSSwapchainWL.h>
Inheritance diagram for RRSSwapchainWL:Public Member Functions | |
| ~RRSSwapchainWL () noexcept | |
| Destroys the swapchain and its shared-memory buffers. | |
| std::optional< const RSwapchainImage > | acquire () noexcept override |
| Acquires the next available buffer. Implements RSwapchain::acquire(). | |
| bool | present (const RSwapchainImage &image, SkRegion *damage=nullptr) noexcept override |
| Attaches, damages and commits the image to the Wayland surface. Implements RSwapchain::present(). | |
| bool | resize (SkISize size) noexcept override |
| Sets the size used for future acquired buffers. Implements RSwapchain::resize(). | |
Public Member Functions inherited from RWLSwapchain | |
| wl_surface * | surface () const noexcept |
| Returns the Wayland surface this swapchain presents to. | |
Public Member Functions inherited from RSwapchain | |
| RSwapchain (SkISize size) noexcept | |
| Construct a swapchain with the given image size. | |
| SkISize | size () const noexcept |
| The size of swapchain images in pixels. | |
Public Member Functions inherited from RObject | |
| RObject ()=default | |
| Constructs a default RObject. | |
Additional Inherited Members | |
Static Public Member Functions inherited from RWLSwapchain | |
| static std::shared_ptr< RWLSwapchain > | Make (wl_surface *surface, SkISize size) noexcept |
| Creates a Wayland swapchain for the given surface. | |
Raster (software) implementation of RWLSwapchain.
RRSSwapchainWL presents CPU-rendered frames to a Wayland wl_surface using shared-memory (wl_shm) buffers. Each swapchain image is an RRSImage whose backing memory is exported to the compositor as a wl_buffer through a wl_shm_pool.
Buffers are recycled based on compositor release events: acquire() reuses the least recently used released buffer (resizing it if needed) or allocates a new one, and surplus buffers are freed once enough frames have elapsed. Only one image may be acquired at a time.
|
noexcept |
Destroys the swapchain and its shared-memory buffers.
|
overridevirtualnoexcept |
Acquires the next available buffer. Implements RSwapchain::acquire().
Implements RSwapchain.
|
overridevirtualnoexcept |
Attaches, damages and commits the image to the Wayland surface. Implements RSwapchain::present().
If damage is null (or the surface is too old for buffer damage) the whole surface is marked damaged; otherwise only the given rects are damaged.
Implements RSwapchain.
|
overridevirtualnoexcept |
Sets the size used for future acquired buffers. Implements RSwapchain::resize().
size is empty, true otherwise. Implements RSwapchain.