# HG changeset patch # User Chris Cannam # Date 1160491877 0 # Node ID dc2fe023a14f0ad8a5e8d3e0ca3396c322bc8197 # Parent f4be20ebdfa487bbb7e72e07b71283933e75cee6 * Improve output from Profiler class and make it incur less (no) overhead in release builds with NO_TIMING defined * Fix a lock contention issue in spectrogram * Marginal optimisations elsewhere diff -r f4be20ebdfa4 -r dc2fe023a14f layer/SpectrogramLayer.cpp --- a/layer/SpectrogramLayer.cpp Mon Oct 09 10:49:46 2006 +0000 +++ b/layer/SpectrogramLayer.cpp Tue Oct 10 14:51:17 2006 +0000 @@ -34,7 +34,7 @@ #include #include -//#define DEBUG_SPECTROGRAM_REPAINT 1 +#define DEBUG_SPECTROGRAM_REPAINT 1 SpectrogramLayer::SpectrogramLayer(Configuration config) : Layer(), @@ -1654,7 +1654,7 @@ v->setLightBackground(false); } -// Profiler profiler("SpectrogramLayer::paint", true); + Profiler profiler("SpectrogramLayer::paint", true); #ifdef DEBUG_SPECTROGRAM_REPAINT std::cerr << "SpectrogramLayer::paint(): m_model is " << m_model << ", zoom level is " << v->getZoomLevel() << ", m_updateTimer " << m_updateTimer << std::endl; @@ -2096,7 +2096,7 @@ std::cerr << "Overall mag unchanged at [" << m_viewMags[v].getMin() << "->" << m_viewMags[v].getMax() << "]" << std::endl; } -// Profiler profiler2("SpectrogramLayer::paint: draw image", true); + Profiler profiler2("SpectrogramLayer::paint: draw image", true); paint.drawImage(x0, y0, m_drawBuffer, 0, 0, w, h); @@ -2520,7 +2520,7 @@ return; } -// Profiler profiler("SpectrogramLayer::paintVerticalScale", true); + Profiler profiler("SpectrogramLayer::paintVerticalScale", true); //!!! cache this?