| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 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 |
|
| 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 |
|
| 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 |
|
| 50 |
|
| 51 |
|
| 52 |
typedef enum g2d_format g2d_format_t; |
| 53 |
|
| 54 |
|
| 55 |
|
| 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 |
|
| 74 |
|
| 75 |
|
| 76 |
#endif |
| 77 |
#endif |
| 78 |
|
| 79 |
#ifdef __cplusplus |
| 80 |
} |
| 81 |
#endif |
| 82 |
|
| 83 |
#endif |