aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-06-21 22:04:18 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-06-22 16:10:35 +0200
commit6ca0145f068d83099ced536f2b0e62b5c2839a8b (patch)
treee6629a0e5f43c43038b6acfeeed025ddc11d2a79 /src/quick
parent25348752a3c48a8914f79141098db0eec810ebe0 (diff)
Emit new frame signals from the software backend
Introduce an autotest case too. Change-Id: I658b09b6e4e5b30cdc2174fdf21f60adf93e44ff Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp4
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp
index ad1f9cacf4..d9bb6780dd 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp
@@ -158,6 +158,8 @@ void QSGSoftwareRenderLoop::renderWindow(QQuickWindow *window, bool isNewExpose)
emit window->afterAnimating();
+ emit window->beforeFrameBegin();
+
cd->syncSceneGraph();
rc->endSync();
@@ -196,6 +198,8 @@ void QSGSoftwareRenderLoop::renderWindow(QQuickWindow *window, bool isNewExpose)
cd->fireFrameSwapped();
}
+ emit window->afterFrameEnd();
+
qint64 swapTime = 0;
if (profileFrames)
swapTime = renderTimer.nsecsElapsed();
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp
index 0ba6e1994a..d25755e66f 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp
@@ -477,6 +477,8 @@ void QSGSoftwareRenderThread::syncAndRender()
const bool exposeRequested = (pendingUpdate & ExposeRequest) == ExposeRequest;
pendingUpdate = 0;
+ emit exposedWindow->beforeFrameBegin();
+
if (syncRequested)
sync(exposeRequested);
@@ -537,6 +539,8 @@ void QSGSoftwareRenderThread::syncAndRender()
qCDebug(QSG_RASTER_LOG_RENDERLOOP, "RT - rendering done");
+ emit exposedWindow->afterFrameEnd();
+
if (exposeRequested) {
qCDebug(QSG_RASTER_LOG_RENDERLOOP, "RT - wake gui after initial expose");
waitCondition.wakeOne();