feat(disp) add drv_update_cb to detect rotation/other parameter changes

This commit is contained in:
Themba Dube
2021-03-07 12:51:42 -05:00
parent a4c33bb16e
commit 438ba35076
2 changed files with 5 additions and 0 deletions

View File

@@ -198,6 +198,8 @@ void lv_disp_drv_update(lv_disp_t * disp, lv_disp_drv_t * new_drv)
disp->inv_p = 0;
if(disp->act_scr != NULL)
lv_obj_invalidate(disp->act_scr);
if(disp->driver.drv_update_cb) disp->driver.drv_update_cb(&disp->driver);
}
/**

View File

@@ -126,6 +126,9 @@ typedef struct _disp_drv_t {
/** OPTIONAL: called to wait while the gpu is working */
void (*gpu_wait_cb)(struct _disp_drv_t * disp_drv);
/** OPTIONAL: called when driver parameters are updated */
void (*drv_update_cb)(struct _disp_drv_t * disp_drv);
#if LV_USE_GPU
/** OPTIONAL: Blend two memories using opacity (GPU only)*/