1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-17 13:51:47 -05:00

GLScope: fixed missing mutex acquisitions wherever the changes flag is set to true

This commit is contained in:
f4exb 2019-08-15 02:11:10 +02:00
parent 41f640bd63
commit 7b8319c79f

View File

@ -191,6 +191,7 @@ void GLScope::initializeGL()
void GLScope::resizeGL(int width, int height)
{
QMutexLocker mutexLocker(&m_mutex);
QOpenGLFunctions *glFunctions = QOpenGLContext::currentContext()->functions();
glFunctions->glViewport(0, 0, width, height);
m_configChanged = true;
@ -198,7 +199,7 @@ void GLScope::resizeGL(int width, int height)
void GLScope::paintGL()
{
if (!m_mutex.tryLock(0)) {
if (!m_mutex.tryLock(2)) {
return;
}
@ -949,6 +950,7 @@ void GLScope::paintGL()
void GLScope::setSampleRate(int sampleRate)
{
QMutexLocker mutexLocker(&m_mutex);
m_sampleRate = sampleRate;
m_configChanged = true;
update();
@ -957,6 +959,7 @@ void GLScope::setSampleRate(int sampleRate)
void GLScope::setTimeBase(int timeBase)
{
QMutexLocker mutexLocker(&m_mutex);
m_timeBase = timeBase;
m_configChanged = true;
update();
@ -964,6 +967,7 @@ void GLScope::setTimeBase(int timeBase)
void GLScope::setTriggerPre(uint32_t triggerPre, bool emitSignal)
{
QMutexLocker mutexLocker(&m_mutex);
m_triggerPre = triggerPre;
m_configChanged = true;
update();
@ -975,6 +979,7 @@ void GLScope::setTriggerPre(uint32_t triggerPre, bool emitSignal)
void GLScope::setTimeOfsProMill(int timeOfsProMill)
{
QMutexLocker mutexLocker(&m_mutex);
m_timeOfsProMill = timeOfsProMill;
m_configChanged = true;
update();
@ -982,6 +987,7 @@ void GLScope::setTimeOfsProMill(int timeOfsProMill)
void GLScope::setFocusedTraceIndex(uint32_t traceIndex)
{
QMutexLocker mutexLocker(&m_mutex);
m_focusedTraceIndex = traceIndex;
m_configChanged = true;
update();
@ -989,6 +995,7 @@ void GLScope::setFocusedTraceIndex(uint32_t traceIndex)
void GLScope::setDisplayMode(DisplayMode displayMode)
{
QMutexLocker mutexLocker(&m_mutex);
m_displayMode = displayMode;
m_configChanged = true;
update();
@ -996,6 +1003,7 @@ void GLScope::setDisplayMode(DisplayMode displayMode)
void GLScope::setTraceSize(int traceSize, bool emitSignal)
{
QMutexLocker mutexLocker(&m_mutex);
m_traceSize = traceSize;
m_configChanged = true;
update();
@ -1007,6 +1015,7 @@ void GLScope::setTraceSize(int traceSize, bool emitSignal)
void GLScope::updateDisplay()
{
QMutexLocker mutexLocker(&m_mutex);
m_configChanged = true;
update();
}