mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 15:02:56 +02:00
cc_draw: add simple debug facility
not perfect, since the borders can be overdrawn afterwards but still pretty useful
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
#include <system/debug.h>
|
||||
extern CPictureViewer * g_PicViewer;
|
||||
|
||||
/* export CCDRAW_DEBUG to paint red lines around all elements */
|
||||
static bool CCDraw_debug = !!(getenv("CCDRAW_DEBUG"));
|
||||
|
||||
CCDraw::CCDraw() : COSDFader(g_settings.theme.menu_Content_alpha)
|
||||
{
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
@@ -551,6 +554,8 @@ void CCDraw::paintFbItems(bool do_save_bg)
|
||||
if (fbtype == CC_FBDATA_TYPE_BACKGROUND){
|
||||
frameBuffer->paintBackgroundBoxRel(fbdata.x, fbdata.y, fbdata.dx, fbdata.dy);
|
||||
v_fbdata[i].is_painted = true;
|
||||
if (CCDraw_debug)
|
||||
frameBuffer->paintBoxFrame(fbdata.x, fbdata.y, fbdata.dx, fbdata.dy, 1, COL_RED);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -684,6 +689,8 @@ void CCDraw::paintFbItems(bool do_save_bg)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CCDraw_debug)
|
||||
frameBuffer->paintBoxFrame(fbdata.x, fbdata.y, fbdata.dx, fbdata.dy, 1, COL_RED);
|
||||
}
|
||||
|
||||
//set is_painted attribut. if any layer was painted set it to true;
|
||||
|
Reference in New Issue
Block a user