From 1a373d8c4cd0483c46a78e0ac650dfd83e25d0aa Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 2 Apr 2019 22:10:16 +0200 Subject: [PATCH] cc_draw.cpp: use random colors for CCDraw_debug For better distinguish objects on screen while debugging. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/07a91b89e0262d3947ed569eda48b360abb99cb3 Author: Thilo Graf Date: 2019-04-02 (Tue, 02 Apr 2019) ------------------ This commit was generated by Migit --- src/gui/components/cc_draw.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/components/cc_draw.cpp b/src/gui/components/cc_draw.cpp index b2c57e3fd..83f9ad600 100644 --- a/src/gui/components/cc_draw.cpp +++ b/src/gui/components/cc_draw.cpp @@ -565,8 +565,7 @@ void CCDraw::paintFbItems(bool do_save_bg) frameBuffer->paintBackgroundBoxRel(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy); v_fbdata[i].is_painted = true; if (CCDraw_debug) - frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, 1, COL_RED); - continue; + frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, 1, COL_RANDOM); } } if (fbtype == CC_FBDATA_TYPE_SHADOW_BOX && ((!is_painted || !v_fbdata[i].is_painted)|| shadow_force || force_paint_bg)) { @@ -701,7 +700,7 @@ void CCDraw::paintFbItems(bool do_save_bg) } } if (CCDraw_debug) - frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, 1, COL_RED); + frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, 1, getRandomColor({255, 255}, {1,255}, {1, 255})); } //set is_painted attribut. if any layer was painted set it to true;