# HG changeset patch # User Chris Cannam # Date 1545216017 0 # Node ID 79032214f79d2dcca1ea0d3b677bf484d2763dde # Parent 6dc3a36d9794b2a0078eb4ab05eebc1018912251 Debug tweaks diff -r 6dc3a36d9794 -r 79032214f79d layer/Colour3DPlotLayer.cpp --- a/layer/Colour3DPlotLayer.cpp Wed Dec 19 10:40:09 2018 +0000 +++ b/layer/Colour3DPlotLayer.cpp Wed Dec 19 10:40:17 2018 +0000 @@ -205,7 +205,7 @@ Colour3DPlotLayer::invalidateMagnitudes() { #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT - cerr << "Colour3DPlotLayer::invalidateMagnitudes called" << endl; + SVDEBUG << "Colour3DPlotLayer::invalidateMagnitudes called" << endl; #endif m_viewMags.clear(); } @@ -626,7 +626,7 @@ if (dormant) { #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT - cerr << "Colour3DPlotLayer::setLayerDormant(" << dormant << ")" + SVDEBUG << "Colour3DPlotLayer::setLayerDormant(" << dormant << ")" << endl; #endif @@ -1118,8 +1118,9 @@ if (m_viewMags[viewId] != magRange) { m_viewMags[viewId] = magRange; #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT - cerr << "mag range in this view has changed: " - << magRange.getMin() << " -> " << magRange.getMax() << endl; + SVDEBUG << "mag range in this view has changed: " + << magRange.getMin() << " -> " + << magRange.getMax() << endl; #endif } } @@ -1127,7 +1128,7 @@ if (!continuingPaint && m_normalizeVisibleArea && m_viewMags[viewId] != m_lastRenderedMags[viewId]) { #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT - cerr << "mag range has changed from last rendered range: re-rendering" + SVDEBUG << "mag range has changed from last rendered range: re-rendering" << endl; #endif delete m_renderers[viewId]; @@ -1146,7 +1147,7 @@ */ Profiler profiler("Colour3DPlotLayer::paint"); #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT - cerr << "Colour3DPlotLayer::paint(): m_model is " << m_model << ", zoom level is " << v->getZoomLevel() << ", rect is (" << rect.x() << "," << rect.y() << ") " << rect.width() << "x" << rect.height() << endl; + SVDEBUG << "Colour3DPlotLayer::paint(): m_model is " << m_model << ", zoom level is " << v->getZoomLevel() << ", rect is (" << rect.x() << "," << rect.y() << ") " << rect.width() << "x" << rect.height() << endl; #endif int completion = 0; @@ -1160,7 +1161,7 @@ if (m_model->getWidth() == 0) { #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT - cerr << "Colour3DPlotLayer::paint(): model width == 0, " + SVDEBUG << "Colour3DPlotLayer::paint(): model width == 0, " << "nothing to paint (yet)" << endl; #endif return; @@ -1305,8 +1306,8 @@ } else if (columnNormalization == "none") { setNormalization(ColumnNormalization::None); } else { - cerr << "NOTE: Unknown or unsupported columnNormalization attribute \"" - << columnNormalization << "\"" << endl; + SVCERR << "NOTE: Unknown or unsupported columnNormalization attribute \"" + << columnNormalization << "\"" << endl; } } diff -r 6dc3a36d9794 -r 79032214f79d layer/Colour3DPlotRenderer.cpp --- a/layer/Colour3DPlotRenderer.cpp Wed Dec 19 10:40:09 2018 +0000 +++ b/layer/Colour3DPlotRenderer.cpp Wed Dec 19 10:40:17 2018 +0000 @@ -305,6 +305,14 @@ } MagnitudeRange range = m_magCache.getRange(reqx0, reqx1 - reqx0); + +#ifdef DEBUG_COLOUR_PLOT_REPAINT + SVDEBUG << "render: returning rect rendered as " << pr.x() << "," << pr.y() + << " " << pr.width() << "x" << pr.height() << endl; + SVDEBUG << "render: mag range from cache in x-range " << reqx0 + << " to " << reqx1 << " is " << range.getMin() << " -> " + << range.getMax() << endl; +#endif return { pr, range }; }