Add DEBUG_PAINT_EVENTS to manager.cpp

This commit is contained in:
David Capello 2014-05-04 21:17:45 -03:00
parent ddf894867a
commit 81d10f1c4f

View File

@ -5,6 +5,7 @@
// Read LICENSE.txt for more information.
// #define REPORT_EVENTS
// #define DEBUG_PAINT_EVENTS
// #define LIMIT_DISPATCH_TIME
#ifdef HAVE_CONFIG_H
@ -21,6 +22,10 @@
#include "ui/intern.h"
#include "ui/ui.h"
#ifdef DEBUG_PAINT_EVENTS
#include "base/thread.h"
#endif
#ifdef REPORT_EVENTS
#include <iostream>
#endif
@ -1308,6 +1313,16 @@ void Manager::pumpQueue()
<< paintMsg->rect().h << ")"
<< std::endl;
#endif
#ifdef DEBUG_PAINT_EVENTS
rectfill(screen,
SCREEN_W*paintMsg->rect().x/JI_SCREEN_W,
SCREEN_H*paintMsg->rect().y/JI_SCREEN_H,
SCREEN_W*(paintMsg->rect().x+paintMsg->rect().w)/JI_SCREEN_W-1,
SCREEN_H*(paintMsg->rect().y+paintMsg->rect().h)/JI_SCREEN_H-1,
makecol(0, 0, 255));
base::this_thread::sleep_for(0.002);
#endif
}
// Call the message handler