X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=logicsignal.cpp;h=7580138fe24e87af7c164c595392968a36a08133;hp=79a27ddd05c97996cc6f7332b3b6b3a7ab4e4058;hb=1e669074475e36ae5f7e1fbdc9ad5809beaccdf3;hpb=652010ea57ca43952d626f33ebf84fb01a663ed4 diff --git a/logicsignal.cpp b/logicsignal.cpp index 79a27ddd..7580138f 100644 --- a/logicsignal.cpp +++ b/logicsignal.cpp @@ -33,8 +33,6 @@ using namespace boost; using namespace std; -const float Log2 = logf(2.0f); - const float LogicSignal::Margin = 10.0f; const float LogicSignal::EdgeColour[3] = {0.50f, 0.50f, 0.50f}; @@ -76,7 +74,7 @@ void LogicSignal::paint(QGLWidget &widget, const QRect &rect, const float high_offset = rect.top() + Margin; const float low_offset = rect.bottom() - Margin; - const queue< shared_ptr > &snapshots = + const deque< shared_ptr > &snapshots = _data->get_snapshots(); if(snapshots.empty()) return; @@ -90,13 +88,11 @@ void LogicSignal::paint(QGLWidget &widget, const QRect &rect, const double samples_per_pixel = samplerate * scale; const double start = samplerate * (offset - start_time); const double end = start + samples_per_pixel * rect.width(); - const int64_t quantization_length = 1LL << (int64_t)floorf( - max(logf((float)samples_per_pixel) / Log2, 0.0f)); snapshot->get_subsampled_edges(edges, min(max((int64_t)floor(start), (int64_t)0), last_sample), min(max((int64_t)ceil(end), (int64_t)0), last_sample), - quantization_length, _probe_index); + samples_per_pixel, _probe_index); // Paint the edges const unsigned int edge_point_count = (edges.size() - 2) * 2;