Debian Codegraph @

lvgl/src/draw/nxp/g2d/lv_g2d_utils.h

raw symbols SCIP
1 /**
2 * @file lv_g2d_utils.h
3 *
4 */
5
6 /**
7 * Copyright 2024 NXP
8 *
9 * SPDX-License-Identifier: MIT
10 */
11
12 #ifndef LV_G2D_UTILS_H
13 #define LV_G2D_UTILS_H
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 /*********************
20 * INCLUDES
21 *********************/
22 #include "../../../lv_conf_internal.h"
23
24 #if LV_USE_G2D
25 #if LV_USE_DRAW_G2D || LV_USE_ROTATE_G2D
26 #include "../../sw/lv_draw_sw_private.h"
27 #include "g2d.h"
28 #include "g2dExt.h"
29
30 /*********************
31 * DEFINES
32 *********************/
33
34 #if LV_USE_G2D_ASSERT
35 #define G2D_ASSERT(expr) LV_ASSERT(expr)
36 #else
37 #define G2D_ASSERT(expr)
38 #endif
39
40 #define G2D_ASSERT_MSG(expr, msg) \
41 do { \
42 if(!(expr)) { \
43 LV_LOG_ERROR(msg); \
44 G2D_ASSERT(false); \
45 } \
46 } while(0)
47
48 /**********************
49 * TYPEDEFS
50 **********************/
51
52 typedef enum g2d_format g2d_format_t;
53
54 /**********************
55 * GLOBAL PROTOTYPES
56 **********************/
57
58 g2d_format_t g2d_get_buf_format(lv_color_format_t cf);
59
60 uint32_t g2d_rgba_to_u32(lv_color_t color);
61
62 int32_t g2d_get_buf_fd(const lv_draw_buf_t * draw_buf);
63
64 void g2d_set_handle(void * handle);
65
66 void * g2d_get_handle(void);
67
68 #if LV_USE_ROTATE_G2D
69 void g2d_rotate(lv_draw_buf_t * buf1, lv_draw_buf_t * buf2, int32_t width, int32_t height, uint32_t rotation,
70 lv_color_format_t cf);
71 #endif
72 /**********************
73 * MACROS
74 **********************/
75
76 #endif /*LV_USE_DRAW_G2D || LV_USE_ROTATE_G2D*/
77 #endif /*LV_USE_G2D*/
78
79 #ifdef __cplusplus
80 } /*extern "C"*/
81 #endif
82
83 #endif /*LV_G2D_UTILS_H*/