mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-16 09:01:49 -05:00
force waterfall to throttle by client dc paint from appframe idle
- Attempting to improve waterfall jitter between platforms
This commit is contained in:
parent
c77d2c9408
commit
8000e97a8c
@ -769,6 +769,10 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
|
|||||||
usleep(5000);
|
usleep(5000);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (this->IsVisible()) {
|
||||||
|
waterfallCanvas->DoPaint();
|
||||||
|
demodWaterfallCanvas->DoPaint();
|
||||||
|
}
|
||||||
event.RequestMore();
|
event.RequestMore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,12 @@ void WaterfallCanvas::processInputQueue() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||||
wxPaintDC dc(this);
|
// event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WaterfallCanvas::DoPaint() {
|
||||||
|
wxClientDC dc(this);
|
||||||
|
// wxPaintDC dc(this);
|
||||||
|
|
||||||
const wxSize ClientSize = GetClientSize();
|
const wxSize ClientSize = GetClientSize();
|
||||||
long double currentZoom = zoom;
|
long double currentZoom = zoom;
|
||||||
@ -354,8 +359,9 @@ void WaterfallCanvas::OnKeyDown(wxKeyEvent& event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
void WaterfallCanvas::OnIdle(wxIdleEvent &event) {
|
void WaterfallCanvas::OnIdle(wxIdleEvent &event) {
|
||||||
Refresh();
|
// Refresh();
|
||||||
event.RequestMore();
|
// event.RequestMore();
|
||||||
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) {
|
void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) {
|
||||||
|
@ -28,6 +28,7 @@ public:
|
|||||||
void attachSpectrumCanvas(SpectrumCanvas *canvas_in);
|
void attachSpectrumCanvas(SpectrumCanvas *canvas_in);
|
||||||
void processInputQueue();
|
void processInputQueue();
|
||||||
SpectrumVisualDataQueue *getVisualDataQueue();
|
SpectrumVisualDataQueue *getVisualDataQueue();
|
||||||
|
void DoPaint();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void OnPaint(wxPaintEvent& event);
|
void OnPaint(wxPaintEvent& event);
|
||||||
|
Loading…
Reference in New Issue
Block a user