cc_draw.cpp: use random colors for CCDraw_debug

For better distinguish objects on screen while debugging.


Origin commit data
------------------
Branch: ni/coolstream
Commit: 07a91b89e0
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-04-02 (Tue, 02 Apr 2019)



------------------
This commit was generated by Migit
This commit is contained in:
2019-04-02 22:10:16 +02:00
committed by vanhofen
parent f7387dce15
commit 1a373d8c4c

View File

@@ -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;