mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
d56dbed44d
We used to spawn a separate thread to poll gpu_main_display_tube for messages from the external supervisor, and then wrap those messages in thread messages (WM_USER_HANDLE_SERVICE_MESSAGE_INTERNAL) that are posted to the WndProc thread. Now that we have replaced GetMessageW() with MsgWaitForMultipleObjects(), we can poll that tube and the message queue at the same time in the WndProc thread, and then route service messages to WindowMessageDispatcher::process_service_message(). The newly added MsgWaitContext looks similar to EventContext but it is much simpler, since we don't need to worry about removing handles, setting timeout, etc. It may get more complex when we start to add more handles to it (for event devices, etc.), and we might look for ways to unify the logic with EventContext, but this simple struct should suffice for now. Bug: 244489783 Bug: 244491590 Test: flat run emulator Test: flat run battlestar Change-Id: I5722523ad1424a1860f2883d33728a1baf9550cc Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4719209 Reviewed-by: Pujun Lun <lunpujun@google.com> Reviewed-by: Noah Gold <nkgold@google.com> Commit-Queue: Kaiyi Li <kaiyili@google.com> |
||
---|---|---|
.. | ||
examples | ||
protocol | ||
src | ||
build.rs | ||
Cargo.toml |