mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-02 21:27:48 -04:00
GLScope: fixed missing mutex acquisitions wherever the changes flag is set to true
This commit is contained in:
parent
41f640bd63
commit
7b8319c79f
@ -191,6 +191,7 @@ void GLScope::initializeGL()
|
|||||||
|
|
||||||
void GLScope::resizeGL(int width, int height)
|
void GLScope::resizeGL(int width, int height)
|
||||||
{
|
{
|
||||||
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
QOpenGLFunctions *glFunctions = QOpenGLContext::currentContext()->functions();
|
QOpenGLFunctions *glFunctions = QOpenGLContext::currentContext()->functions();
|
||||||
glFunctions->glViewport(0, 0, width, height);
|
glFunctions->glViewport(0, 0, width, height);
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
@ -198,7 +199,7 @@ void GLScope::resizeGL(int width, int height)
|
|||||||
|
|
||||||
void GLScope::paintGL()
|
void GLScope::paintGL()
|
||||||
{
|
{
|
||||||
if (!m_mutex.tryLock(0)) {
|
if (!m_mutex.tryLock(2)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -949,6 +950,7 @@ void GLScope::paintGL()
|
|||||||
|
|
||||||
void GLScope::setSampleRate(int sampleRate)
|
void GLScope::setSampleRate(int sampleRate)
|
||||||
{
|
{
|
||||||
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
m_sampleRate = sampleRate;
|
m_sampleRate = sampleRate;
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
@ -957,6 +959,7 @@ void GLScope::setSampleRate(int sampleRate)
|
|||||||
|
|
||||||
void GLScope::setTimeBase(int timeBase)
|
void GLScope::setTimeBase(int timeBase)
|
||||||
{
|
{
|
||||||
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
m_timeBase = timeBase;
|
m_timeBase = timeBase;
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
@ -964,6 +967,7 @@ void GLScope::setTimeBase(int timeBase)
|
|||||||
|
|
||||||
void GLScope::setTriggerPre(uint32_t triggerPre, bool emitSignal)
|
void GLScope::setTriggerPre(uint32_t triggerPre, bool emitSignal)
|
||||||
{
|
{
|
||||||
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
m_triggerPre = triggerPre;
|
m_triggerPre = triggerPre;
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
@ -975,6 +979,7 @@ void GLScope::setTriggerPre(uint32_t triggerPre, bool emitSignal)
|
|||||||
|
|
||||||
void GLScope::setTimeOfsProMill(int timeOfsProMill)
|
void GLScope::setTimeOfsProMill(int timeOfsProMill)
|
||||||
{
|
{
|
||||||
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
m_timeOfsProMill = timeOfsProMill;
|
m_timeOfsProMill = timeOfsProMill;
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
@ -982,6 +987,7 @@ void GLScope::setTimeOfsProMill(int timeOfsProMill)
|
|||||||
|
|
||||||
void GLScope::setFocusedTraceIndex(uint32_t traceIndex)
|
void GLScope::setFocusedTraceIndex(uint32_t traceIndex)
|
||||||
{
|
{
|
||||||
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
m_focusedTraceIndex = traceIndex;
|
m_focusedTraceIndex = traceIndex;
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
@ -989,6 +995,7 @@ void GLScope::setFocusedTraceIndex(uint32_t traceIndex)
|
|||||||
|
|
||||||
void GLScope::setDisplayMode(DisplayMode displayMode)
|
void GLScope::setDisplayMode(DisplayMode displayMode)
|
||||||
{
|
{
|
||||||
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
m_displayMode = displayMode;
|
m_displayMode = displayMode;
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
@ -996,6 +1003,7 @@ void GLScope::setDisplayMode(DisplayMode displayMode)
|
|||||||
|
|
||||||
void GLScope::setTraceSize(int traceSize, bool emitSignal)
|
void GLScope::setTraceSize(int traceSize, bool emitSignal)
|
||||||
{
|
{
|
||||||
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
m_traceSize = traceSize;
|
m_traceSize = traceSize;
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
@ -1007,6 +1015,7 @@ void GLScope::setTraceSize(int traceSize, bool emitSignal)
|
|||||||
|
|
||||||
void GLScope::updateDisplay()
|
void GLScope::updateDisplay()
|
||||||
{
|
{
|
||||||
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user