lots of tweaking and adding debug output including operator<</dump(ostream&) methods...
[ardour.git] / libs / canvas / canvas / debug.h
1 #ifndef __CANVAS_DEBUG_H__
2 #define __CANVAS_DEBUG_H__
3
4 #include <sys/time.h>
5 #include <map>
6 #include "pbd/debug.h"
7
8 namespace PBD {
9         namespace DEBUG {
10                 extern uint64_t CanvasItems;
11                 extern uint64_t CanvasItemsDirtied;
12                 extern uint64_t CanvasEvents;
13         }
14 }
15
16 #ifdef CANVAS_DEBUG
17 #define CANVAS_DEBUG_NAME(i, n) i->name = n;
18 #else
19 #define CANVAS_DEBUG(i, n) /* empty */
20 #endif
21
22 namespace ArdourCanvas {
23         extern struct timeval epoch;
24         extern std::map<std::string, struct timeval> last_time;
25         extern void checkpoint (std::string, std::string);
26         extern void set_epoch ();
27         extern int render_count;
28         extern int dump_depth;
29 }
30
31 #endif