mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 05:35:47 +01:00
Canvas: temporary easy way to get debug output from Canvas::render() in a test program
This commit is contained in:
parent
0cf78ae1fe
commit
f7332d2f70
2 changed files with 18 additions and 10 deletions
|
|
@ -109,6 +109,9 @@ Canvas::zoomed ()
|
|||
pick_current_item (0); // no current mouse position
|
||||
}
|
||||
|
||||
static bool debug_render = true;
|
||||
#define CANVAS_DEBUG
|
||||
|
||||
/** Render an area of the canvas.
|
||||
* @param area Area in window coordinates.
|
||||
* @param context Cairo context to render to.
|
||||
|
|
@ -121,7 +124,7 @@ Canvas::render (Rect const & area, Cairo::RefPtr<Cairo::Context> const & context
|
|||
_last_render_start_timestamp = g_get_monotonic_time();
|
||||
|
||||
#ifdef CANVAS_DEBUG
|
||||
if (DEBUG_ENABLED(PBD::DEBUG::CanvasRender)) {
|
||||
if (debug_render || DEBUG_ENABLED(PBD::DEBUG::CanvasRender)) {
|
||||
cerr << this << " RENDER: " << area << endl;
|
||||
//cerr << "CANVAS @ " << this << endl;
|
||||
//dump (cerr);
|
||||
|
|
@ -134,6 +137,7 @@ Canvas::render (Rect const & area, Cairo::RefPtr<Cairo::Context> const & context
|
|||
Rect root_bbox = _root.bounding_box();
|
||||
if (!root_bbox) {
|
||||
/* the root has no bounding box, so there's nothing to render */
|
||||
cerr << "no bbox\n";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -144,6 +148,7 @@ Canvas::render (Rect const & area, Cairo::RefPtr<Cairo::Context> const & context
|
|||
area, so render it.
|
||||
*/
|
||||
|
||||
cerr << "root draw\n";
|
||||
_root.render (draw, context);
|
||||
|
||||
#if defined CANVAS_DEBUG && !PLATFORM_WINDOWS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue