summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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