fix(sysmon): fix the compensation of flush time in rendering time (#5150)
This commit is contained in:
committed by
GitHub
parent
4018ef89e1
commit
8a2a3ec0f5
@@ -1034,8 +1034,6 @@ static void call_flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t *
|
|||||||
.y2 = area->y2 + disp->offset_y
|
.y2 = area->y2 + disp->offset_y
|
||||||
};
|
};
|
||||||
|
|
||||||
// if(disp->layer_head->buffer_convert) disp->layer_head->buffer_convert(disp->layer_head);
|
|
||||||
|
|
||||||
lv_display_send_event(disp, LV_EVENT_FLUSH_START, &offset_area);
|
lv_display_send_event(disp, LV_EVENT_FLUSH_START, &offset_area);
|
||||||
disp->flush_cb(disp, &offset_area, px_map);
|
disp->flush_cb(disp, &offset_area, px_map);
|
||||||
lv_display_send_event(disp, LV_EVENT_FLUSH_FINISH, &offset_area);
|
lv_display_send_event(disp, LV_EVENT_FLUSH_FINISH, &offset_area);
|
||||||
|
|||||||
@@ -151,12 +151,11 @@ static void perf_update_timer_cb(lv_timer_t * t)
|
|||||||
0;
|
0;
|
||||||
info->calculated.flush_avg_time = info->measured.flush_cnt ? (info->measured.flush_elaps_sum / info->measured.flush_cnt)
|
info->calculated.flush_avg_time = info->measured.flush_cnt ? (info->measured.flush_elaps_sum / info->measured.flush_cnt)
|
||||||
: 0;
|
: 0;
|
||||||
info->calculated.render_avg_time = info->measured.render_cnt ? (info->measured.render_elaps_sum /
|
/*Flush time was measured in rendering time so subtract it*/
|
||||||
|
info->calculated.render_avg_time = info->measured.render_cnt ? ((info->measured.render_elaps_sum -
|
||||||
|
info->measured.flush_elaps_sum) /
|
||||||
info->measured.render_cnt) : 0;
|
info->measured.render_cnt) : 0;
|
||||||
|
|
||||||
/*Flush time was measured in rendering time*/
|
|
||||||
info->calculated.render_avg_time -= info->calculated.flush_avg_time;
|
|
||||||
|
|
||||||
info->calculated.cpu_avg_total = ((info->calculated.cpu_avg_total * (info->calculated.run_cnt - 1)) +
|
info->calculated.cpu_avg_total = ((info->calculated.cpu_avg_total * (info->calculated.run_cnt - 1)) +
|
||||||
info->calculated.cpu) / info->calculated.run_cnt;
|
info->calculated.cpu) / info->calculated.run_cnt;
|
||||||
info->calculated.fps_avg_total = ((info->calculated.fps_avg_total * (info->calculated.run_cnt - 1)) +
|
info->calculated.fps_avg_total = ((info->calculated.fps_avg_total * (info->calculated.run_cnt - 1)) +
|
||||||
|
|||||||
Reference in New Issue
Block a user