Currently, the pixel conversion functions repeat the same loop to iterate the rows. Instead of repeating the same code for each pixel format, create a function to wrap the loop and isolate the pixel conversion functionality. Suggested-by: Arthur Grillo <arthurgrillo@riseup.net> Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Arthur Grillo <arthurgrillo@riseup.net> Signed-off-by: Maíra Canal <mairacanal@riseup.net> Link: https://patchwork.freedesktop.org/patch/msgid/20230418130525.128733-2-mcanal@igalia.com
13 lines
242 B
C
13 lines
242 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
|
#ifndef _VKMS_FORMATS_H_
|
|
#define _VKMS_FORMATS_H_
|
|
|
|
#include "vkms_drv.h"
|
|
|
|
void *get_pixel_conversion_function(u32 format);
|
|
|
|
void *get_line_to_frame_function(u32 format);
|
|
|
|
#endif /* _VKMS_FORMATS_H_ */
|