changeset 161:dc2fe023a14f

* 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
author Chris Cannam
date Tue, 10 Oct 2006 14:51:17 +0000
parents f4be20ebdfa4
children f32212631b9c
files layer/SpectrogramLayer.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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 <cassert>
 #include <cmath>
 
-//#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?