Commit graph

5 commits

Author SHA1 Message Date
Simon Ser
96f3f3c92e render/pixel-format: add support for block-based formats
Some formats like sub-sampled YCbCr use a block of bytes to
store the color values for more than one pixel. Update our format
table to be able to handle such formats.
2023-05-21 20:28:45 +00:00
Simon Ser
78a1ac540e render/pixel-format: add docs 2023-05-21 20:28:45 +00:00
Simon Ser
6e88eeadeb render/pixel_format: import pixel_format_info_check_stride()
We'll use this function from wlr_shm too.

Add some assertions, use int32_t (since the wire protocol uses that,
and we don't want to use 16-bit integers on exotic systems) and
switch the stride check to be overflow-safe.
2022-11-15 16:30:00 +00:00
Simon Zeni
50d2985607 Move render/shm_format functions to render/pixel_format 2021-03-25 10:55:54 +01:00
Simon Zeni
5fd82c6f54 render/pixel_format: introduce pixel format info table 2021-03-25 10:55:54 +01:00