|
Ream v0.1.0-1
C++ graphics library for Linux
|
OpenGL backend implementation of RWLSwapchain. More...
#include <RGLSwapchainWL.h>
Inheritance diagram for RGLSwapchainWL:Public Member Functions | |
| ~RGLSwapchainWL () noexcept | |
Destroys the EGL surface and the wl_egl_window. | |
| std::optional< const RSwapchainImage > | acquire () noexcept override |
| Acquires the swapchain image to render the next frame into. | |
| bool | present (const RSwapchainImage &image, SkRegion *damage=nullptr) noexcept override |
| Presents a previously acquired image to the Wayland surface. | |
| bool | resize (SkISize size) noexcept override |
Resizes the swapchain (and the underlying wl_egl_window). | |
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. | |
OpenGL backend implementation of RWLSwapchain.
Presents to a Wayland surface via EGL. It creates a wl_egl_window and an EGLSurface for the given wl_surface, wraps that surface as an RGLImage, and drives presentation with eglSwapBuffers (using eglSwapBuffersWithDamageKHR when damage and the extension are available). Created via RWLSwapchain::Make().
|
noexcept |
Destroys the EGL surface and the wl_egl_window.
|
overridevirtualnoexcept |
Acquires the swapchain image to render the next frame into.
std::nullopt if an image is already acquired and not yet presented. Implements RSwapchain.
|
overridevirtualnoexcept |
Presents a previously acquired image to the Wayland surface.
| image | The image returned by acquire(). |
| damage | Optional damage region (in image coordinates); enables damage-aware swapping when supported, otherwise the whole surface is swapped. |
true on success, false if the image does not match or was not acquired. Implements RSwapchain.
|
overridevirtualnoexcept |
Resizes the swapchain (and the underlying wl_egl_window).
| size | The new size in pixels. Must be non-empty. |
true on success (including when the size is unchanged), false if the size is invalid. Implements RSwapchain.