mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
feat(vg_lite): optimize check_image_is_supported (#6802)
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
This commit is contained in:
parent
4b5742c60d
commit
650dba8650
@ -91,14 +91,7 @@ void lv_draw_vg_lite_deinit(void)
|
|||||||
|
|
||||||
static bool check_image_is_supported(const lv_draw_image_dsc_t * dsc)
|
static bool check_image_is_supported(const lv_draw_image_dsc_t * dsc)
|
||||||
{
|
{
|
||||||
lv_image_header_t header;
|
return lv_vg_lite_is_src_cf_supported(dsc->header.cf);
|
||||||
lv_result_t res = lv_image_decoder_get_info(dsc->src, &header);
|
|
||||||
if(res != LV_RESULT_OK) {
|
|
||||||
LV_LOG_TRACE("get image info failed");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return lv_vg_lite_is_src_cf_supported(header.cf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void draw_execute(lv_draw_vg_lite_unit_t * u)
|
static void draw_execute(lv_draw_vg_lite_unit_t * u)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user