diff options
author | Janne Kangas <janne.kangas@qt.io> | 2019-07-16 14:51:45 +0300 |
---|---|---|
committer | Janne Kangas <janne.kangas@qt.io> | 2019-08-09 13:46:54 +0300 |
commit | 2ac5dc0fcd1503fa11a90e17054f1d4ea370b6d6 (patch) | |
tree | 1beb0052a95c70ce5880966b1de8208b83ccb627 /src/api/studio3dqml/q3dsstudio3d.cpp | |
parent | bb6fff1b707c15853f137b5a7b8797fa9415d33f (diff) |
Batch datainput value changes per-frame for QML context
Group all changes in datainput values on QML side together and send a
single per-frame command. This ameliorates the performance cost of frequent
value updates, especially for projects with large amount of datainputs.
Change-Id: Ib398f405dedb50ad3f5429f42024b3f490114dab
Task-id: QT3DS-3759
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/api/studio3dqml/q3dsstudio3d.cpp')
-rw-r--r-- | src/api/studio3dqml/q3dsstudio3d.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/api/studio3dqml/q3dsstudio3d.cpp b/src/api/studio3dqml/q3dsstudio3d.cpp index 38d32d4..8183d7b 100644 --- a/src/api/studio3dqml/q3dsstudio3d.cpp +++ b/src/api/studio3dqml/q3dsstudio3d.cpp @@ -454,6 +454,11 @@ void Q3DSStudio3D::tick() */ void Q3DSStudio3D::getCommands(bool emitInitialize, CommandQueue &renderQueue) { + if (m_presentation->d_ptr->m_dataInputsChanged) { + m_presentation->d_ptr->setDataInputValueBatch(); + m_presentation->d_ptr->m_dataInputsChanged = false; + } + if (emitInitialize) m_emitRunningChange = true; |