diff layer/TimeValueLayer.cpp @ 1492:a2fbcfeb2572

Debug
author Chris Cannam
date Thu, 08 Aug 2019 13:33:38 +0100
parents e540aa5d89cd
children 37df1530519d
line wrap: on
line diff
--- a/layer/TimeValueLayer.cpp	Thu Aug 08 13:33:30 2019 +0100
+++ b/layer/TimeValueLayer.cpp	Thu Aug 08 13:33:38 2019 +0100
@@ -894,6 +894,10 @@
     sv_samplerate_t sampleRate = model->getSampleRate();
     if (!sampleRate) return;
 
+#ifdef DEBUG_TIME_VALUE_LAYER
+    SVCERR << "TimeValueLayer[" << this << ", model " << getModel() << "]::paint in " << v->getId() << endl;
+#endif
+    
     paint.setRenderHint(QPainter::Antialiasing, false);
 
 //    Profiler profiler("TimeValueLayer::paint", true);
@@ -904,6 +908,16 @@
     if (m_derivative) --frame0;
 
     EventVector points(model->getEventsWithin(frame0, frame1 - frame0, 1));
+
+#ifdef DEBUG_TIME_VALUE_LAYER
+    SVCERR << "TimeValueLayer[" << this << "]::paint in " << v->getId()
+           << ": pixel extents " << x0 << " to " << x1 << ", frame extents "
+           << frame0 << " to " << frame1 << " yielding " << points.size()
+           << " points (of " << model->getAllEvents().size()
+           << " from frames " << model->getStartFrame() << " to "
+           << model->getEndFrame() << ")" << endl;
+#endif
+    
     if (points.empty()) return;
 
     paint.setPen(getBaseQColor());