cc_draw: ensure kill of rendered boxes only if enabled

Avoids unnecessary render of empty parts on screen.
This commit is contained in:
2019-12-30 20:41:08 +01:00
parent 28a051b14c
commit 69a1014ab7

View File

@@ -766,14 +766,15 @@ void CCDraw::kill(const fb_pixel_t& bg_color, const int& corner_radius, const in
}
if (v_fbdata.at(i).dx > 0 && v_fbdata.at(i).dy > 0){
frameBuffer->paintBoxRel(v_fbdata.at(i).x,
v_fbdata.at(i).y,
v_fbdata.at(i).dx,
v_fbdata.at(i).dy,
bg_color,
r,
v_fbdata.at(i).rtype);
if (v_fbdata.at(i).fbdata_type & (CC_FBDATA_TYPE_BOX | CC_FBDATA_TYPE_SHADOW_BOX) && v_fbdata.at(i).enabled){
frameBuffer->paintBoxRel(v_fbdata.at(i).x,
v_fbdata.at(i).y,
v_fbdata.at(i).dx,
v_fbdata.at(i).dy,
bg_color,
r,
v_fbdata.at(i).rtype);
}
if (v_fbdata.at(i).fbdata_type & CC_FBDATA_TYPE_FRAME){
if (v_fbdata.at(i).frame_thickness)
frameBuffer->paintBoxFrame(v_fbdata.at(i).x,