Ream v0.1.0-1
C++ graphics library for Linux
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
RWLFormat Struct Reference

Helper for converting between DRM pixel formats and Wayland wl_shm formats. More...

#include <RWLFormat.h>

Static Public Member Functions

static constexpr wl_shm_format FromDRM (RFormat format) noexcept
 Converts a DRM (FourCC) format to the equivalent wl_shm_format.
 
static constexpr RFormat ToDRM (wl_shm_format format) noexcept
 Converts a Wayland wl_shm_format to the equivalent DRM (FourCC) format.
 

Detailed Description

Helper for converting between DRM pixel formats and Wayland wl_shm formats.

Member Function Documentation

◆ FromDRM()

static constexpr wl_shm_format FromDRM ( RFormat  format)
inlinestaticconstexprnoexcept

Converts a DRM (FourCC) format to the equivalent wl_shm_format.

The XRGB8888 and ARGB8888 formats are mapped to their dedicated wl_shm enumerators; all other formats share the same numeric value and are cast through directly.

◆ ToDRM()

static constexpr RFormat ToDRM ( wl_shm_format  format)
inlinestaticconstexprnoexcept

Converts a Wayland wl_shm_format to the equivalent DRM (FourCC) format.

The XRGB8888 and ARGB8888 enumerators are mapped to their DRM FourCC counterparts; all other formats share the same numeric value and are cast through directly.