summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Sørvig <morten.sorvig@qt.io>2022-05-05 18:08:27 +0200
committerDavid Skoland <david.skoland@qt.io>2022-07-06 06:59:59 +0200
commit63a9430664051413ae1f81a6fce7586052c84267 (patch)
tree495ed98856ad11c6a991362b295f53e9d3705ecd
parentb692d7b268948d9af0a9c0e9e188074e2347eecb (diff)
wasm: delete unused requestUpdate() code path
Commit 5359d4 made it so that the window will always have a valid compositor pointer, which means that we don't have to keep the "no-compositor" fallback code path around. Change-Id: Id226e272937a7d488b27ea08dbc575fd9a039ac6 Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io>
-rw-r--r--src/plugins/platforms/wasm/qwasmwindow.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/plugins/platforms/wasm/qwasmwindow.cpp b/src/plugins/platforms/wasm/qwasmwindow.cpp
index 4206ede1bb..171339fc6c 100644
--- a/src/plugins/platforms/wasm/qwasmwindow.cpp
+++ b/src/plugins/platforms/wasm/qwasmwindow.cpp
@@ -394,19 +394,7 @@ qreal QWasmWindow::devicePixelRatio() const
void QWasmWindow::requestUpdate()
{
- if (m_compositor) {
- m_compositor->requestUpdateWindow(this, QWasmCompositor::UpdateRequestDelivery);
- return;
- }
-
- static auto frame = [](double time, void *context) -> int {
- Q_UNUSED(time);
- QWasmWindow *window = static_cast<QWasmWindow *>(context);
- window->m_requestAnimationFrameId = -1;
- window->deliverUpdateRequest();
- return 0;
- };
- m_requestAnimationFrameId = emscripten_request_animation_frame(frame, this);
+ m_compositor->requestUpdateWindow(this, QWasmCompositor::UpdateRequestDelivery);
}
bool QWasmWindow::hasTitleBar() const