From: Ryan Govostes Date: Mon, 25 Mar 2019 16:50:25 +0000 (+0100) Subject: Use multiple drawLine() calls instead of drawPolyline() X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8a07bc241694c10678968309bc8ee4e6076df3a3;p=pulseview.git Use multiple drawLine() calls instead of drawPolyline() --- diff --git a/pv/views/trace/analogsignal.cpp b/pv/views/trace/analogsignal.cpp index 60ba2ca9..3430ab3c 100644 --- a/pv/views/trace/analogsignal.cpp +++ b/pv/views/trace/analogsignal.cpp @@ -444,7 +444,9 @@ void AnalogSignal::paint_trace(QPainter &p, } delete[] sample_block; - p.drawPolyline(points, points_count); + // QPainter::drawPolyline() is slow, let's paint the lines ourselves + for (int64_t i = 1; i < points_count; i++) + p.drawLine(points[i - 1], points[i]); if (show_sampling_points) { if (paint_thr_dots) {