fix(disp): rename lv_disp_get_buf to lv_disp_get_draw_buf (#2136)
follow up the commit:
commit e9cc1c2d46
Author: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Date: Wed Mar 10 13:07:15 2021 +0100
feat(driver): raname lv_disp_buf_t to lv_disp_draw_buf_t + save only the drv's pointer in lv_disp_t
This commit is contained in:
@@ -409,7 +409,7 @@ static void lv_refr_area(const lv_area_t * area_p)
|
|||||||
/*True double buffering: there are two screen sized buffers. Just redraw directly into a
|
/*True double buffering: there are two screen sized buffers. Just redraw directly into a
|
||||||
* buffer*/
|
* buffer*/
|
||||||
if(lv_disp_is_true_double_buf(disp_refr)) {
|
if(lv_disp_is_true_double_buf(disp_refr)) {
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp_refr);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp_refr);
|
||||||
vdb->area.x1 = 0;
|
vdb->area.x1 = 0;
|
||||||
vdb->area.x2 = lv_disp_get_hor_res(disp_refr) - 1;
|
vdb->area.x2 = lv_disp_get_hor_res(disp_refr) - 1;
|
||||||
vdb->area.y1 = 0;
|
vdb->area.y1 = 0;
|
||||||
@@ -419,7 +419,7 @@ static void lv_refr_area(const lv_area_t * area_p)
|
|||||||
}
|
}
|
||||||
/*The buffer is smaller: refresh the area in parts*/
|
/*The buffer is smaller: refresh the area in parts*/
|
||||||
else {
|
else {
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp_refr);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp_refr);
|
||||||
/*Calculate the max row num*/
|
/*Calculate the max row num*/
|
||||||
lv_coord_t w = lv_area_get_width(area_p);
|
lv_coord_t w = lv_area_get_width(area_p);
|
||||||
lv_coord_t h = lv_area_get_height(area_p);
|
lv_coord_t h = lv_area_get_height(area_p);
|
||||||
@@ -494,7 +494,7 @@ static void lv_refr_area(const lv_area_t * area_p)
|
|||||||
*/
|
*/
|
||||||
static void lv_refr_area_part(const lv_area_t * area_p)
|
static void lv_refr_area_part(const lv_area_t * area_p)
|
||||||
{
|
{
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp_refr);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp_refr);
|
||||||
|
|
||||||
while(vdb->flushing) {
|
while(vdb->flushing) {
|
||||||
if(disp_refr->driver->wait_cb) disp_refr->driver->wait_cb(disp_refr->driver);
|
if(disp_refr->driver->wait_cb) disp_refr->driver->wait_cb(disp_refr->driver);
|
||||||
@@ -844,7 +844,7 @@ static void lv_refr_vdb_rotate(lv_area_t *area, lv_color_t *color_p) {
|
|||||||
} else if(drv->rotated == LV_DISP_ROT_90 || drv->rotated == LV_DISP_ROT_270) {
|
} else if(drv->rotated == LV_DISP_ROT_90 || drv->rotated == LV_DISP_ROT_270) {
|
||||||
/*Allocate a temporary buffer to store rotated image */
|
/*Allocate a temporary buffer to store rotated image */
|
||||||
lv_color_t * rot_buf = NULL;
|
lv_color_t * rot_buf = NULL;
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp_refr);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp_refr);
|
||||||
lv_coord_t area_w = lv_area_get_width(area);
|
lv_coord_t area_w = lv_area_get_width(area);
|
||||||
lv_coord_t area_h = lv_area_get_height(area);
|
lv_coord_t area_h = lv_area_get_height(area);
|
||||||
/*Determine the maximum number of rows that can be rotated at a time*/
|
/*Determine the maximum number of rows that can be rotated at a time*/
|
||||||
@@ -907,7 +907,7 @@ static void lv_refr_vdb_rotate(lv_area_t *area, lv_color_t *color_p) {
|
|||||||
*/
|
*/
|
||||||
static void lv_refr_vdb_flush(void)
|
static void lv_refr_vdb_flush(void)
|
||||||
{
|
{
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp_refr);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp_refr);
|
||||||
lv_color_t * color_p = vdb->buf_act;
|
lv_color_t * color_p = vdb->buf_act;
|
||||||
|
|
||||||
vdb->flushing = 1;
|
vdb->flushing = 1;
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ LV_ATTRIBUTE_FAST_MEM void _lv_blend_fill(const lv_area_t * clip_area, const lv_
|
|||||||
if(mask_res == LV_DRAW_MASK_RES_TRANSP) return;
|
if(mask_res == LV_DRAW_MASK_RES_TRANSP) return;
|
||||||
|
|
||||||
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp);
|
||||||
const lv_area_t * disp_area = &vdb->area;
|
const lv_area_t * disp_area = &vdb->area;
|
||||||
lv_color_t * disp_buf = vdb->buf_act;
|
lv_color_t * disp_buf = vdb->buf_act;
|
||||||
|
|
||||||
@@ -202,7 +202,7 @@ LV_ATTRIBUTE_FAST_MEM void _lv_blend_map(const lv_area_t * clip_area, const lv_a
|
|||||||
if(!is_common) return;
|
if(!is_common) return;
|
||||||
|
|
||||||
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp);
|
||||||
const lv_area_t * disp_area = &vdb->area;
|
const lv_area_t * disp_area = &vdb->area;
|
||||||
lv_color_t * disp_buf = vdb->buf_act;
|
lv_color_t * disp_buf = vdb->buf_act;
|
||||||
|
|
||||||
|
|||||||
@@ -344,7 +344,7 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_map(const lv_area_t * map_area, const
|
|||||||
lv_area_copy(&draw_area, clip_area);
|
lv_area_copy(&draw_area, clip_area);
|
||||||
|
|
||||||
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp);
|
||||||
const lv_area_t * disp_area = &vdb->area;
|
const lv_area_t * disp_area = &vdb->area;
|
||||||
|
|
||||||
/* Now `draw_area` has absolute coordinates.
|
/* Now `draw_area` has absolute coordinates.
|
||||||
|
|||||||
@@ -671,7 +671,7 @@ static void draw_letter_subpx(lv_coord_t pos_x, lv_coord_t pos_y, lv_font_glyph_
|
|||||||
lv_color_t * color_buf = lv_mem_buf_get(mask_buf_size * sizeof(lv_color_t));
|
lv_color_t * color_buf = lv_mem_buf_get(mask_buf_size * sizeof(lv_color_t));
|
||||||
|
|
||||||
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
||||||
lv_disp_buf_t * vdb = lv_disp_get_buf(disp);
|
lv_disp_buf_t * vdb = lv_disp_get_draw_buf(disp);
|
||||||
|
|
||||||
int32_t vdb_width = lv_area_get_width(&vdb->area);
|
int32_t vdb_width = lv_area_get_width(&vdb->area);
|
||||||
lv_color_t * vdb_buf_tmp = vdb->buf_act;
|
lv_color_t * vdb_buf_tmp = vdb->buf_act;
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_line_hor(const lv_point_t * point1, const
|
|||||||
/*If there other mask apply it*/
|
/*If there other mask apply it*/
|
||||||
else {
|
else {
|
||||||
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp);
|
||||||
const lv_area_t * disp_area = &vdb->area;
|
const lv_area_t * disp_area = &vdb->area;
|
||||||
/* Get clipped fill area which is the real draw area.
|
/* Get clipped fill area which is the real draw area.
|
||||||
* It is always the same or inside `fill_area` */
|
* It is always the same or inside `fill_area` */
|
||||||
@@ -251,7 +251,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_line_ver(const lv_point_t * point1, const
|
|||||||
/*If there other mask apply it*/
|
/*If there other mask apply it*/
|
||||||
else {
|
else {
|
||||||
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp);
|
||||||
const lv_area_t * disp_area = &vdb->area;
|
const lv_area_t * disp_area = &vdb->area;
|
||||||
/* Get clipped fill area which is the real draw area.
|
/* Get clipped fill area which is the real draw area.
|
||||||
* It is always the same or inside `fill_area` */
|
* It is always the same or inside `fill_area` */
|
||||||
@@ -408,7 +408,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_line_skew(const lv_point_t * point1, cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp);
|
||||||
|
|
||||||
const lv_area_t * disp_area = &vdb->area;
|
const lv_area_t * disp_area = &vdb->area;
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_bg(const lv_area_t * coords, const lv_are
|
|||||||
if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
|
if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
|
||||||
|
|
||||||
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp);
|
||||||
|
|
||||||
/* Get clipped fill area which is the real draw area.
|
/* Get clipped fill area which is the real draw area.
|
||||||
* It is always the same or inside `fill_area` */
|
* It is always the same or inside `fill_area` */
|
||||||
@@ -421,7 +421,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_border(const lv_area_t * coords, const lv
|
|||||||
if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
|
if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
|
||||||
|
|
||||||
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp);
|
||||||
|
|
||||||
/* Get clipped fill area which is the real draw area.
|
/* Get clipped fill area which is the real draw area.
|
||||||
* It is always the same or inside `fill_area` */
|
* It is always the same or inside `fill_area` */
|
||||||
@@ -552,7 +552,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_shadow(const lv_area_t * coords, const lv
|
|||||||
if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
|
if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
|
||||||
|
|
||||||
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp);
|
||||||
|
|
||||||
/* Get clipped fill area which is the real draw area.
|
/* Get clipped fill area which is the real draw area.
|
||||||
* It is always the same or inside `fill_area` */
|
* It is always the same or inside `fill_area` */
|
||||||
@@ -1286,7 +1286,7 @@ static void draw_full_border(const lv_area_t * area_inner, const lv_area_t * are
|
|||||||
}
|
}
|
||||||
|
|
||||||
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
|
||||||
lv_disp_draw_buf_t * vdb = lv_disp_get_buf(disp);
|
lv_disp_draw_buf_t * vdb = lv_disp_get_draw_buf(disp);
|
||||||
|
|
||||||
/* Get clipped fill area which is the real draw area.
|
/* Get clipped fill area which is the real draw area.
|
||||||
* It is always the same or inside `fill_area` */
|
* It is always the same or inside `fill_area` */
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ lv_disp_t * lv_disp_get_next(lv_disp_t * disp)
|
|||||||
* @param disp pointer to a display
|
* @param disp pointer to a display
|
||||||
* @return pointer to the internal buffers
|
* @return pointer to the internal buffers
|
||||||
*/
|
*/
|
||||||
lv_disp_draw_buf_t * lv_disp_get_buf(lv_disp_t * disp)
|
lv_disp_draw_buf_t * lv_disp_get_draw_buf(lv_disp_t * disp)
|
||||||
{
|
{
|
||||||
return disp->driver->draw_buf;
|
return disp->driver->draw_buf;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ lv_disp_t * lv_disp_get_next(lv_disp_t * disp);
|
|||||||
* @param disp pointer to a display
|
* @param disp pointer to a display
|
||||||
* @return pointer to the internal buffers
|
* @return pointer to the internal buffers
|
||||||
*/
|
*/
|
||||||
lv_disp_draw_buf_t * lv_disp_get_buf(lv_disp_t * disp);
|
lv_disp_draw_buf_t * lv_disp_get_draw_buf(lv_disp_t * disp);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the number of areas in the buffer
|
* Get the number of areas in the buffer
|
||||||
|
|||||||
Reference in New Issue
Block a user