crosvm/gpu_display/Cargo.toml
Pujun Lun b97f10ef0f gpu_display: upstream Windows implementation
On Windows, we have to create a GUI thread that creates the window and
retrieves window messages from the thread-specific message queue created
by the system. All host events, such as window resizing and mouse and
keyboard events, are sent in the form of window messages. Hence, we
created these structs/traits to model it:

- `Window`: Owns the handle of one window, and provides helper functions
  for operating on this window.
- `HandleWindowMessage`: A trait implemented by the struct that
  processes host events. In our case, that is the surface.
- `WindowMessageProcessor`: Holds one `Window` object and one
  `HandleWindowMessage` trait object. We only support one window for
  now. Once we support multi-windowing, there will be multiple
  processors.
- `WindowMessageDispatcher`: A singleton, responsible for dispatching
  messages retrieved from the message queue to the targeted processor.
- `WindowProcedureThread`: Wraps the GUI thread, retrieves messages from
  the message queue and forwards them to the dispatcher. It also
  provides helper functions for other threads to talk to the GUI thread.
- `MessageRelayThread`: Relays service messages to the GUI thread.

Main difference from other platforms: event devices are imported to the
GUI thread, since all host events are processed there.

BUG=b:213150276
TEST=presubmit

Change-Id: I0aabf6adf8a9ff4b24375e9c7df7625b6f761c7a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3834009
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Pujun Lun <lunpujun@google.com>
2022-09-16 17:36:57 +00:00

34 lines
692 B
TOML

[package]
name = "gpu_display"
version = "0.1.0"
authors = ["The Chromium OS Authors"]
edition = "2021"
[features]
x = []
kiwi = []
[dependencies]
data_model = { path = "../common/data_model" }
libc = "*"
base = { path = "../base" }
linux_input_sys = { path = "../linux_input_sys" }
remain = "*"
thiserror = "*"
cfg-if = "*"
[target.'cfg(windows)'.dependencies]
anyhow = "*"
metrics = { path = "../metrics" }
num-traits = "*"
serde = { version = "1", features = [ "derive" ] }
winapi = "*"
win_util = { path = "../win_util" }
sync = { path = "../common/sync" }
euclid = "*"
vm_control = { path = "../vm_control" }
[build-dependencies]
cc = "1.0.25"
pkg-config = "0.3.11"
cfg-if = "1.0.0"