From 63a9430664051413ae1f81a6fce7586052c84267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20S=C3=B8rvig?= Date: Thu, 5 May 2022 18:08:27 +0200 Subject: 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 Reviewed-by: David Skoland --- src/plugins/platforms/wasm/qwasmwindow.cpp | 14 +------------- 1 file changed, 1 insertion(+), 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(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 -- cgit v1.2.3