summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmcompositor.cpp
diff options
context:
space:
mode:
authorMikolaj Boc <mikolaj.boc@qt.io>2022-08-17 08:38:54 +0200
committerMikolaj Boc <mikolaj.boc@qt.io>2022-10-05 00:36:41 +0200
commit9bf689e875ce1f5e80696cbc86d446074b01c705 (patch)
tree0d6f0c32cffb872fac60e6e98e71705e78fad97e /src/plugins/platforms/wasm/qwasmcompositor.cpp
parentb9887d51c396d126dd1dfc67a18a7de361db205b (diff)
Remove dead code & cull public API in WASM compositor
- Remove the manual destroy methods - destructor should handle destruction - Remove the unused enum QWasmStateFlag - Make public API private where possible - Adjust handleTouch->processTouch to keep consistency with other process methods - Remove dead fields in compositor - Don't keep a dead screen entry in m_screens in qwasmintegration Change-Id: I98caf4dbdda5ebd25c4a9c22a40140c7ed1d7aa7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmcompositor.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmcompositor.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcompositor.cpp b/src/plugins/platforms/wasm/qwasmcompositor.cpp
index 16435add9d2..fe310618cec 100644
--- a/src/plugins/platforms/wasm/qwasmcompositor.cpp
+++ b/src/plugins/platforms/wasm/qwasmcompositor.cpp
@@ -199,8 +199,6 @@ void QWasmCompositor::setVisible(QWasmWindow *window, bool visible)
return;
m_windowVisibility[window] = visible;
- if (!visible)
- m_globalDamage = window->window()->geometry(); // repaint previously covered area.
requestUpdateWindow(window, QWasmCompositor::ExposeEventDelivery);
}
@@ -212,15 +210,9 @@ void QWasmCompositor::raise(QWasmWindow *window)
void QWasmCompositor::lower(QWasmWindow *window)
{
- m_globalDamage = window->window()->geometry(); // repaint previously covered area.
m_windowStack.lower(window);
}
-int QWasmCompositor::windowCount() const
-{
- return m_windowStack.size();
-}
-
QWindow *QWasmCompositor::windowAt(QPoint targetPointInScreenCoords, int padding) const
{
const auto found = std::find_if(
@@ -578,7 +570,7 @@ int QWasmCompositor::wheel_cb(int eventType, const EmscriptenWheelEvent *wheelEv
int QWasmCompositor::touchCallback(int eventType, const EmscriptenTouchEvent *touchEvent, void *userData)
{
auto compositor = reinterpret_cast<QWasmCompositor*>(userData);
- return static_cast<int>(compositor->handleTouch(eventType, touchEvent));
+ return static_cast<int>(compositor->processTouch(eventType, touchEvent));
}
bool QWasmCompositor::processPointer(const PointerEvent& event)
@@ -936,7 +928,7 @@ bool QWasmCompositor::processWheel(int eventType, const EmscriptenWheelEvent *wh
return accepted;
}
-int QWasmCompositor::handleTouch(int eventType, const EmscriptenTouchEvent *touchEvent)
+bool QWasmCompositor::processTouch(int eventType, const EmscriptenTouchEvent *touchEvent)
{
QList<QWindowSystemInterface::TouchPoint> touchPointList;
touchPointList.reserve(touchEvent->numTouches);