@@ -18,6 +18,8 @@ extern "C" {
18
18
#warning "esp_lvgl_port_lv_blend.h included, but CONFIG_LV_DRAW_SW_ASM_CUSTOM not set. Assembly rendering not used"
19
19
#else
20
20
21
+ #include "lv_version.h"
22
+
21
23
/*********************
22
24
* DEFINES
23
25
*********************/
@@ -53,31 +55,92 @@ typedef struct {
53
55
* GLOBAL PROTOTYPES
54
56
**********************/
55
57
58
+ #if ((LVGL_VERSION_MAJOR == 9 ) && (LVGL_VERSION_MINOR == 1 ))
59
+
60
+ typedef struct {
61
+ void * dest_buf ;
62
+ int32_t dest_w ;
63
+ int32_t dest_h ;
64
+ int32_t dest_stride ;
65
+ const lv_opa_t * mask_buf ;
66
+ int32_t mask_stride ;
67
+ lv_color_t color ;
68
+ lv_opa_t opa ;
69
+ } bsp_blend_fill_dsc_t ;
70
+
71
+ typedef struct {
72
+ void * dest_buf ;
73
+ int32_t dest_w ;
74
+ int32_t dest_h ;
75
+ int32_t dest_stride ;
76
+ const lv_opa_t * mask_buf ;
77
+ int32_t mask_stride ;
78
+ const void * src_buf ;
79
+ int32_t src_stride ;
80
+ lv_color_format_t src_color_format ;
81
+ lv_opa_t opa ;
82
+ lv_blend_mode_t blend_mode ;
83
+ } bsp_blend_image_dsc_t ;
84
+
85
+ #elif ((LVGL_VERSION_MAJOR == 9 ) && (LVGL_VERSION_MINOR == 2 ))
86
+
87
+ typedef struct {
88
+ void * dest_buf ;
89
+ int32_t dest_w ;
90
+ int32_t dest_h ;
91
+ int32_t dest_stride ;
92
+ const lv_opa_t * mask_buf ;
93
+ int32_t mask_stride ;
94
+ lv_color_t color ;
95
+ lv_opa_t opa ;
96
+ lv_area_t relative_area ;
97
+ } bsp_blend_fill_dsc_t ;
98
+
99
+ typedef struct {
100
+ void * dest_buf ;
101
+ int32_t dest_w ;
102
+ int32_t dest_h ;
103
+ int32_t dest_stride ;
104
+ const lv_opa_t * mask_buf ;
105
+ int32_t mask_stride ;
106
+ const void * src_buf ;
107
+ int32_t src_stride ;
108
+ lv_color_format_t src_color_format ;
109
+ lv_opa_t opa ;
110
+ lv_blend_mode_t blend_mode ;
111
+ lv_area_t relative_area ; /**< The blend area relative to the layer's buffer area. */
112
+ lv_area_t src_area ; /**< The original src area. */
113
+ } bsp_blend_image_dsc_t ;
114
+
115
+ #endif
116
+
56
117
extern int lv_color_blend_to_argb8888_esp (asm_dsc_t * asm_dsc );
57
118
58
- static inline lv_result_t _lv_color_blend_to_argb8888_esp (_lv_draw_sw_blend_fill_dsc_t * dsc )
119
+ static inline lv_result_t _lv_color_blend_to_argb8888_esp (void * dsc )
59
120
{
121
+ bsp_blend_fill_dsc_t * fill_dsc = (bsp_blend_fill_dsc_t * ) dsc ;
60
122
asm_dsc_t asm_dsc = {
61
- .dst_buf = dsc -> dest_buf ,
62
- .dst_w = dsc -> dest_w ,
63
- .dst_h = dsc -> dest_h ,
64
- .dst_stride = dsc -> dest_stride ,
65
- .src_buf = & dsc -> color ,
123
+ .dst_buf = fill_dsc -> dest_buf ,
124
+ .dst_w = fill_dsc -> dest_w ,
125
+ .dst_h = fill_dsc -> dest_h ,
126
+ .dst_stride = fill_dsc -> dest_stride ,
127
+ .src_buf = & fill_dsc -> color ,
66
128
};
67
129
68
130
return lv_color_blend_to_argb8888_esp (& asm_dsc );
69
131
}
70
132
71
133
extern int lv_color_blend_to_rgb565_esp (asm_dsc_t * asm_dsc );
72
134
73
- static inline lv_result_t _lv_color_blend_to_rgb565_esp (_lv_draw_sw_blend_fill_dsc_t * dsc )
135
+ static inline lv_result_t _lv_color_blend_to_rgb565_esp (void * dsc )
74
136
{
137
+ bsp_blend_fill_dsc_t * fill_dsc = (bsp_blend_fill_dsc_t * ) dsc ;
75
138
asm_dsc_t asm_dsc = {
76
- .dst_buf = dsc -> dest_buf ,
77
- .dst_w = dsc -> dest_w ,
78
- .dst_h = dsc -> dest_h ,
79
- .dst_stride = dsc -> dest_stride ,
80
- .src_buf = & dsc -> color ,
139
+ .dst_buf = fill_dsc -> dest_buf ,
140
+ .dst_w = fill_dsc -> dest_w ,
141
+ .dst_h = fill_dsc -> dest_h ,
142
+ .dst_stride = fill_dsc -> dest_stride ,
143
+ .src_buf = & fill_dsc -> color ,
81
144
};
82
145
83
146
return lv_color_blend_to_rgb565_esp (& asm_dsc );
0 commit comments