mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-03 21:29:57 +02:00
Lock the QML Surface resizing better
This commit is contained in:
parent
b41c106f3c
commit
fe1d8b24b4
1 changed files with 23 additions and 23 deletions
|
@ -241,6 +241,7 @@ void OffscreenQmlRenderThread::cleanup() {
|
|||
|
||||
void OffscreenQmlRenderThread::resize() {
|
||||
// Lock _newSize changes
|
||||
{
|
||||
QMutexLocker locker(&_mutex);
|
||||
|
||||
// Update our members
|
||||
|
@ -257,16 +258,15 @@ void OffscreenQmlRenderThread::resize() {
|
|||
}
|
||||
|
||||
uvec2 newOffscreenSize = toGlm(_newSize * pixelRatio);
|
||||
_textures.setSize(newOffscreenSize);
|
||||
if (newOffscreenSize == _size) {
|
||||
return;
|
||||
}
|
||||
_size = newOffscreenSize;
|
||||
|
||||
qDebug() << "Offscreen UI resizing to " << _newSize.width() << "x" << _newSize.height() << " with pixel ratio " << pixelRatio;
|
||||
_size = newOffscreenSize;
|
||||
}
|
||||
|
||||
locker.unlock();
|
||||
|
||||
_textures.setSize(_size);
|
||||
setupFbo();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue