mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
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.
This commit is contained in:
parent
8cfd44980b
commit
6e88eeadeb
3 changed files with 23 additions and 17 deletions
|
|
@ -19,6 +19,8 @@ struct wlr_pixel_format_info {
|
|||
};
|
||||
|
||||
const struct wlr_pixel_format_info *drm_get_pixel_format_info(uint32_t fmt);
|
||||
bool pixel_format_info_check_stride(const struct wlr_pixel_format_info *info,
|
||||
int32_t stride, int32_t width);
|
||||
|
||||
uint32_t convert_wl_shm_format_to_drm(enum wl_shm_format fmt);
|
||||
enum wl_shm_format convert_drm_format_to_wl_shm(uint32_t fmt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue