1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

lv_hal_disp_copy updated

This commit is contained in:
Gabor Kiss-Vamosi 2017-10-18 13:47:35 +02:00
parent dbe741da12
commit 2b44c68794

View File

@ -117,27 +117,26 @@ void lv_vfill(const area_t * cords_p, const area_t * mask_p,
/*Move the vdb_tmp to the first row*/ /*Move the vdb_tmp to the first row*/
vdb_buf_tmp += vdb_width * vdb_rel_a.y1; vdb_buf_tmp += vdb_width * vdb_rel_a.y1;
#if DISP_HW_ACC == 0 if(lv_disp_is_accelerated() == false) {
sw_color_fill(&vdb_p->area, vdb_buf_tmp, &vdb_rel_a, color, opa); sw_color_fill(&vdb_p->area, vdb_buf_tmp, &vdb_rel_a, color, opa);
#else } else {
static color_t color_map[LV_HOR_RES]; static color_t color_map[LV_HOR_RES];
static cord_t last_width = 0; static cord_t last_width = 0;
cord_t map_width = area_get_width(&vdb_rel_a); cord_t map_width = area_get_width(&vdb_rel_a);
if(color_map[0].full != color.full || last_width != map_width) { if(color_map[0].full != color.full || last_width != map_width) {
uint16_t i; uint16_t i;
for(i = 0; i < map_width; i++) { for(i = 0; i < map_width; i++) {
color_map[i].full = color.full; color_map[i].full = color.full;
} }
last_width = map_width; last_width = map_width;
} }
cord_t row; cord_t row;
for(row = vdb_rel_a.y1;row <= vdb_rel_a.y2; row++) { for(row = vdb_rel_a.y1;row <= vdb_rel_a.y2; row++) {
lv_disp_color_cpy(&vdb_buf_tmp[vdb_rel_a.x1], color_map, map_width, opa); lv_disp_copy(&vdb_buf_tmp[vdb_rel_a.x1], color_map, map_width, opa);
vdb_buf_tmp += vdb_width; vdb_buf_tmp += vdb_width;
}
} }
#endif
} }
/** /**
@ -323,11 +322,11 @@ void lv_vmap(const area_t * cords_p, const area_t * mask_p,
cord_t map_useful_w = area_get_width(&masked_a); cord_t map_useful_w = area_get_width(&masked_a);
for(row = masked_a.y1; row <= masked_a.y2; row++) { for(row = masked_a.y1; row <= masked_a.y2; row++) {
#if DISP_HW_ACC == 0 if(lv_disp_is_accelerated() == false) {
sw_color_cpy(&vdb_buf_tmp[masked_a.x1], &map_p[masked_a.x1], map_useful_w, opa); sw_color_cpy(&vdb_buf_tmp[masked_a.x1], &map_p[masked_a.x1], map_useful_w, opa);
#else } else {
lv_disp_color_cpy(&vdb_buf_tmp[masked_a.x1], &map_p[masked_a.x1], map_useful_w, opa); lv_disp_copy(&vdb_buf_tmp[masked_a.x1], &map_p[masked_a.x1], map_useful_w, opa);
#endif }
map_p += map_width; /*Next row on the map*/ map_p += map_width; /*Next row on the map*/
vdb_buf_tmp += vdb_width; /*Next row on the VDB*/ vdb_buf_tmp += vdb_width; /*Next row on the VDB*/
} }
@ -463,8 +462,6 @@ void lv_vmap(const area_t * cords_p, const area_t * mask_p,
* STATIC FUNCTIONS * STATIC FUNCTIONS
**********************/ **********************/
#if DISP_HW_ACC == 0
/** /**
* Copy pixels to destination memory using opacity * Copy pixels to destination memory using opacity
* @param dest a memory address. Copy 'src' here. * @param dest a memory address. Copy 'src' here.
@ -532,6 +529,5 @@ static void sw_color_fill(area_t * mem_area, color_t * mem, const area_t * fill_
} }
} }
} }
#endif /*DISP_HW_ACC == 0*/
#endif #endif