1 /** 2 * @file lv_draw_buf_vg_lite.c 3 * 4 */ 5 6 /********************* 7 * INCLUDES 8 *********************/ 9 10 #include "lv_draw_vg_lite.h" 11 12 #if LV_USE_DRAW_VG_LITE 13 14 #include "../lv_draw_buf_private.h" 15 #include "lv_vg_lite_utils.h" 16 17 /********************* 18 * DEFINES 19 *********************/ 20 21 /********************** 22 * TYPEDEFS 23 **********************/ 24 25 /********************** 26 * STATIC PROTOTYPES 27 **********************/ 28 29 static uint32_t width_to_stride(uint32_t w, lv_color_format_t color_format); 30 31 /********************** 32 * STATIC VARIABLES 33 **********************/ 34 35 /********************** 36 * MACROS 37 **********************/ 38 39 /********************** 40 * GLOBAL FUNCTIONS 41 **********************/ 42 lv_draw_buf_vg_lite_init_handlers(void)43void lv_draw_buf_vg_lite_init_handlers(void) 44 { 45 lv_draw_buf_handlers_t * handlers = lv_draw_buf_get_handlers(); 46 handlers->width_to_stride_cb = width_to_stride; 47 } 48 49 /********************** 50 * STATIC FUNCTIONS 51 **********************/ 52 width_to_stride(uint32_t w,lv_color_format_t color_format)53static uint32_t width_to_stride(uint32_t w, lv_color_format_t color_format) 54 { 55 return lv_vg_lite_width_to_stride(w, lv_vg_lite_vg_fmt(color_format)); 56 } 57 58 #endif /*LV_USE_DRAW_VG_LITE*/ 59