From cb19ca717a008668880809c3e768aade9ea6e65d Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 31 Dec 2019 00:26:58 +0100 Subject: [PATCH] cc_draw: ensure kill of rendered boxes only if enabled Avoids unnecessary render of empty parts on screen. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/635560b89656fd826110fd970c1e10816b6ab1a5 Author: Thilo Graf Date: 2019-12-31 (Tue, 31 Dec 2019) ------------------ This commit was generated by Migit --- src/gui/components/cc_draw.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/gui/components/cc_draw.cpp b/src/gui/components/cc_draw.cpp index 7e4cc1896..9c015ec94 100644 --- a/src/gui/components/cc_draw.cpp +++ b/src/gui/components/cc_draw.cpp @@ -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,