Lines Matching refs:disp_refr
77 static lv_disp_t * disp_refr; /*Display being refreshed*/ variable
268 return disp_refr; in _lv_refr_get_disp_refreshing()
279 disp_refr = disp; in _lv_refr_set_disp_refreshing()
294 disp_refr = tmr->user_data; in _lv_disp_refr_timer()
304 disp_refr = lv_disp_get_default(); in _lv_disp_refr_timer()
308 lv_obj_update_layout(disp_refr->act_scr); in _lv_disp_refr_timer()
309 if(disp_refr->prev_scr) lv_obj_update_layout(disp_refr->prev_scr); in _lv_disp_refr_timer()
311 lv_obj_update_layout(disp_refr->top_layer); in _lv_disp_refr_timer()
312 lv_obj_update_layout(disp_refr->sys_layer); in _lv_disp_refr_timer()
315 if(disp_refr->act_scr == NULL) { in _lv_disp_refr_timer()
316 disp_refr->inv_p = 0; in _lv_disp_refr_timer()
327 if(disp_refr->inv_p != 0) { in _lv_disp_refr_timer()
330 if(disp_refr->driver->direct_mode && disp_refr->driver->draw_buf->buf2) { in _lv_disp_refr_timer()
333 for(i = 0; i < disp_refr->inv_p; i++) { in _lv_disp_refr_timer()
334 if(disp_refr->inv_area_joined[i]) in _lv_disp_refr_timer()
337 lv_area_t * sync_area = _lv_ll_ins_tail(&disp_refr->sync_areas); in _lv_disp_refr_timer()
338 *sync_area = disp_refr->inv_areas[i]; in _lv_disp_refr_timer()
343 lv_memset_00(disp_refr->inv_areas, sizeof(disp_refr->inv_areas)); in _lv_disp_refr_timer()
344 lv_memset_00(disp_refr->inv_area_joined, sizeof(disp_refr->inv_area_joined)); in _lv_disp_refr_timer()
345 disp_refr->inv_p = 0; in _lv_disp_refr_timer()
350 if(disp_refr->driver->monitor_cb) { in _lv_disp_refr_timer()
351 disp_refr->driver->monitor_cb(disp_refr->driver, elaps, px_num); in _lv_disp_refr_timer()
390 if(disp_refr->refr_timer) { in _lv_disp_refr_timer()
391 fps_limit = 1000 / disp_refr->refr_timer->period; in _lv_disp_refr_timer()
481 for(join_in = 0; join_in < disp_refr->inv_p; join_in++) { in lv_refr_join_area()
482 if(disp_refr->inv_area_joined[join_in] != 0) continue; in lv_refr_join_area()
485 for(join_from = 0; join_from < disp_refr->inv_p; join_from++) { in lv_refr_join_area()
487 if(disp_refr->inv_area_joined[join_from] != 0 || join_in == join_from) { in lv_refr_join_area()
492 … if(_lv_area_is_on(&disp_refr->inv_areas[join_in], &disp_refr->inv_areas[join_from]) == false) { in lv_refr_join_area()
496 … _lv_area_join(&joined_area, &disp_refr->inv_areas[join_in], &disp_refr->inv_areas[join_from]); in lv_refr_join_area()
499 if(lv_area_get_size(&joined_area) < (lv_area_get_size(&disp_refr->inv_areas[join_in]) + in lv_refr_join_area()
500 … lv_area_get_size(&disp_refr->inv_areas[join_from]))) { in lv_refr_join_area()
501 lv_area_copy(&disp_refr->inv_areas[join_in], &joined_area); in lv_refr_join_area()
504 disp_refr->inv_area_joined[join_from] = 1; in lv_refr_join_area()
516 if(!disp_refr->driver->direct_mode) return; in refr_sync_areas()
519 if(disp_refr->driver->draw_buf->buf2 == NULL) return; in refr_sync_areas()
522 if(_lv_ll_is_empty(&disp_refr->sync_areas)) return; in refr_sync_areas()
526 void * buf_off_screen = disp_refr->driver->draw_buf->buf_act; in refr_sync_areas()
527 void * buf_on_screen = disp_refr->driver->draw_buf->buf_act == disp_refr->driver->draw_buf->buf1 in refr_sync_areas()
528 ? disp_refr->driver->draw_buf->buf2 in refr_sync_areas()
529 : disp_refr->driver->draw_buf->buf1; in refr_sync_areas()
532 lv_coord_t stride = lv_disp_get_hor_res(disp_refr); in refr_sync_areas()
539 for(i = 0; i < disp_refr->inv_p; i++) { in refr_sync_areas()
541 if(disp_refr->inv_area_joined[i]) continue; in refr_sync_areas()
544 sync_area = _lv_ll_get_head(&disp_refr->sync_areas); in refr_sync_areas()
547 next_area = _lv_ll_get_next(&disp_refr->sync_areas, sync_area); in refr_sync_areas()
550 res_c = _lv_area_diff(res, sync_area, &disp_refr->inv_areas[i]); in refr_sync_areas()
556 new_area = _lv_ll_ins_prev(&disp_refr->sync_areas, sync_area); in refr_sync_areas()
559 _lv_ll_remove(&disp_refr->sync_areas, sync_area); in refr_sync_areas()
569 for(sync_area = _lv_ll_get_head(&disp_refr->sync_areas); sync_area != NULL; in refr_sync_areas()
570 sync_area = _lv_ll_get_next(&disp_refr->sync_areas, sync_area)) { in refr_sync_areas()
571 disp_refr->driver->draw_ctx->buffer_copy( in refr_sync_areas()
572 disp_refr->driver->draw_ctx, in refr_sync_areas()
579 _lv_ll_clear(&disp_refr->sync_areas); in refr_sync_areas()
589 if(disp_refr->inv_p == 0) return; in refr_invalid_areas()
594 for(i = disp_refr->inv_p - 1; i >= 0; i--) { in refr_invalid_areas()
595 if(disp_refr->inv_area_joined[i] == 0) { in refr_invalid_areas()
602 if(disp_refr->driver->render_start_cb) { in refr_invalid_areas()
603 disp_refr->driver->render_start_cb(disp_refr->driver); in refr_invalid_areas()
606 disp_refr->driver->draw_buf->last_area = 0; in refr_invalid_areas()
607 disp_refr->driver->draw_buf->last_part = 0; in refr_invalid_areas()
608 disp_refr->rendering_in_progress = true; in refr_invalid_areas()
610 for(i = 0; i < disp_refr->inv_p; i++) { in refr_invalid_areas()
612 if(disp_refr->inv_area_joined[i] == 0) { in refr_invalid_areas()
614 if(i == last_i) disp_refr->driver->draw_buf->last_area = 1; in refr_invalid_areas()
615 disp_refr->driver->draw_buf->last_part = 0; in refr_invalid_areas()
616 refr_area(&disp_refr->inv_areas[i]); in refr_invalid_areas()
618 px_num += lv_area_get_size(&disp_refr->inv_areas[i]); in refr_invalid_areas()
622 disp_refr->rendering_in_progress = false; in refr_invalid_areas()
631 lv_draw_ctx_t * draw_ctx = disp_refr->driver->draw_ctx; in refr_area()
632 draw_ctx->buf = disp_refr->driver->draw_buf->buf_act; in refr_area()
636 if(disp_refr->driver->full_refresh || disp_refr->driver->direct_mode) { in refr_area()
638 …lv_area_set(&disp_area, 0, 0, lv_disp_get_hor_res(disp_refr) - 1, lv_disp_get_ver_res(disp_refr) -… in refr_area()
641 if(disp_refr->driver->full_refresh) { in refr_area()
642 disp_refr->driver->draw_buf->last_part = 1; in refr_area()
647 disp_refr->driver->draw_buf->last_part = disp_refr->driver->draw_buf->last_area; in refr_area()
658 lv_coord_t y2 = area_p->y2 >= lv_disp_get_ver_res(disp_refr) ? in refr_area()
659 lv_disp_get_ver_res(disp_refr) - 1 : area_p->y2; in refr_area()
661 int32_t max_row = get_max_row(disp_refr, w, h); in refr_area()
674 draw_ctx->buf = disp_refr->driver->draw_buf->buf_act; in refr_area()
677 if(y2 == row_last) disp_refr->driver->draw_buf->last_part = 1; in refr_area()
690 draw_ctx->buf = disp_refr->driver->draw_buf->buf_act; in refr_area()
691 disp_refr->driver->draw_buf->last_part = 1; in refr_area()
698 lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp_refr); in refr_area_part()
706 …bool full_sized = draw_buf->size == (uint32_t)disp_refr->driver->hor_res * disp_refr->driver->ver_… in refr_area_part()
710 if(disp_refr->driver->wait_cb) disp_refr->driver->wait_cb(disp_refr->driver); in refr_area_part()
715 if(disp_refr->driver->screen_transp) { in refr_area_part()
716 if(disp_refr->driver->clear_cb) { in refr_area_part()
717 …disp_refr->driver->clear_cb(disp_refr->driver, disp_refr->driver->draw_buf->buf_act, disp_refr->dr… in refr_area_part()
720 …lv_memset_00(disp_refr->driver->draw_buf->buf_act, disp_refr->driver->draw_buf->size * LV_IMG_PX_S… in refr_area_part()
730 top_act_scr = lv_refr_get_top_obj(draw_ctx->buf_area, lv_disp_get_scr_act(disp_refr)); in refr_area_part()
731 if(disp_refr->prev_scr) { in refr_area_part()
732 top_prev_scr = lv_refr_get_top_obj(draw_ctx->buf_area, disp_refr->prev_scr); in refr_area_part()
739 lv_disp_get_hor_res(disp_refr) - 1, lv_disp_get_ver_res(disp_refr) - 1); in refr_area_part()
743 dsc.bg_img_src = disp_refr->bg_img; in refr_area_part()
744 dsc.bg_img_opa = disp_refr->bg_opa; in refr_area_part()
745 dsc.bg_color = disp_refr->bg_color; in refr_area_part()
746 dsc.bg_opa = disp_refr->bg_opa; in refr_area_part()
749 else if(disp_refr->bg_img) { in refr_area_part()
751 lv_res_t res = lv_img_decoder_get_info(disp_refr->bg_img, &header); in refr_area_part()
755 dsc.opa = disp_refr->bg_opa; in refr_area_part()
756 lv_draw_img(draw_ctx, &dsc, &a, disp_refr->bg_img); in refr_area_part()
765 dsc.bg_color = disp_refr->bg_color; in refr_area_part()
766 dsc.bg_opa = disp_refr->bg_opa; in refr_area_part()
771 if(disp_refr->draw_prev_over_act) { in refr_area_part()
772 if(top_act_scr == NULL) top_act_scr = disp_refr->act_scr; in refr_area_part()
776 if(disp_refr->prev_scr) { in refr_area_part()
777 if(top_prev_scr == NULL) top_prev_scr = disp_refr->prev_scr; in refr_area_part()
783 if(disp_refr->prev_scr) { in refr_area_part()
784 if(top_prev_scr == NULL) top_prev_scr = disp_refr->prev_scr; in refr_area_part()
788 if(top_act_scr == NULL) top_act_scr = disp_refr->act_scr; in refr_area_part()
793 refr_obj_and_children(draw_ctx, lv_disp_get_layer_top(disp_refr)); in refr_area_part()
794 refr_obj_and_children(draw_ctx, lv_disp_get_layer_sys(disp_refr)); in refr_area_part()
796 draw_buf_flush(disp_refr); in refr_area_part()
850 if(top_obj == NULL) top_obj = lv_disp_get_scr_act(disp_refr); in refr_obj_and_children()
1018 draw_dsc.antialias = disp_refr->driver->antialiasing; in refr_obj()
1056 if(disp_refr->driver->rounder_cb) { in get_max_row()
1065 disp_refr->driver->rounder_cb(disp_refr->driver, &tmp); in get_max_row()
1180 lv_disp_drv_t * drv = disp_refr->driver; in draw_buf_rotate()
1181 if(disp_refr->driver->full_refresh && drv->sw_rotate) { in draw_buf_rotate()
1192 lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp_refr); in draw_buf_rotate()
1269 lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp_refr); in draw_buf_flush()
1277 …bool full_sized = draw_buf->size == (uint32_t)disp_refr->driver->hor_res * disp_refr->driver->ver_… in draw_buf_flush()
1280 if(disp_refr->driver->wait_cb) disp_refr->driver->wait_cb(disp_refr->driver); in draw_buf_flush()
1286 …if(disp_refr->driver->draw_buf->last_area && disp_refr->driver->draw_buf->last_part) draw_buf->flu… in draw_buf_flush()