WebContent: Coalesce multiple sequential MouseMove events

This can avoid getting into a situation where lots of MouseMove events
are queued up and they all trigger relayout (or something else that
takes a lot of time).

To make sure that we don't get out of sync with the input events queue
on the UI process side, we still send acknowledgements for coalesced
MouseMoves. There's room for improvement here.

My Discord friends list is now pleasantly responsive. :^)
This commit is contained in:
Andreas Kling 2023-03-14 13:47:40 +01:00
commit a58d84407f
Notes: sideshowbarker 2024-07-17 18:13:59 +09:00
2 changed files with 24 additions and 8 deletions

View file

@ -136,6 +136,7 @@ private:
unsigned modifiers {};
int wheel_delta_x {};
int wheel_delta_y {};
size_t coalesced_event_count { 0 };
};
struct QueuedKeyboardEvent {