]> sigrok.org Git - pulseview.git/commit
DecodeTrace/DecodeSignal: Rework trace drawing interval
authorSoeren Apel <redacted>
Tue, 4 Jul 2017 19:23:30 +0000 (21:23 +0200)
committerUwe Hermann <redacted>
Wed, 5 Jul 2017 22:37:08 +0000 (00:37 +0200)
commit5b6ae10391736ab2f81de851686dee15bbcbf9f9
tree76ef5af06ac210d4f17a52b03af20fcb88fb5688
parent1ec191ed5406f1a6a7acb54472c66e7dc0554c20
DecodeTrace/DecodeSignal: Rework trace drawing interval

Before, we'd redraw the decode trace every n annotations that
came in. However, that causes a lot of unnecessary redraws
when we're zoomed out relatively far and makes the UI less
responsive in return.

Instead, use a one-shot timer with a fixed delay to redraw
the trace after data has been processed. This way, there is
an upper bound to how often we redraw the trace while at the
same time providing a fixed interval at which we update,
regardless of how many annotations came in, making the
trace fill up continuously.

With that in place, we can also remove annotation_count_
and inc_annotation_count().
pv/data/decodesignal.cpp
pv/data/decodesignal.hpp
pv/views/trace/decodetrace.cpp
pv/views/trace/decodetrace.hpp