diff options
author | Zach Reizner <zachr@google.com> | 2018-05-03 13:19:37 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-07-09 15:48:21 -0700 |
commit | 20d71f8928e1e95f6554c87cfca12f24f9f652cf (patch) | |
tree | 1d383fdbe0edf037f55b5b0f0100ee8a2fd94747 /gpu_display/src/dwl.rs | |
parent | ac5a8dbe505daf95a802cc606988bc2323087a05 (diff) | |
download | crosvm-20d71f8928e1e95f6554c87cfca12f24f9f652cf.tar crosvm-20d71f8928e1e95f6554c87cfca12f24f9f652cf.tar.gz crosvm-20d71f8928e1e95f6554c87cfca12f24f9f652cf.tar.bz2 crosvm-20d71f8928e1e95f6554c87cfca12f24f9f652cf.tar.lz crosvm-20d71f8928e1e95f6554c87cfca12f24f9f652cf.tar.xz crosvm-20d71f8928e1e95f6554c87cfca12f24f9f652cf.tar.zst crosvm-20d71f8928e1e95f6554c87cfca12f24f9f652cf.zip |
gpu_display: provides wayland based output for virtio-gpu
This provides virtual display style output, useful for debugging virtio-gpu. Although using virtio-gpu for display purposes clashes with the more integreated virtio-wayland support, it is nonetheless helpful for debugging virtio-gpu, and is technically required to fully implement that device. TEST=cargo build -p gpu_display BUG=chromium:837073 CQ-DEPEND=CL:1096300 Change-Id: I59f895e951ef593d4119e7558168dd34223519ee Reviewed-on: https://chromium-review.googlesource.com/1043446 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'gpu_display/src/dwl.rs')
-rw-r--r-- | gpu_display/src/dwl.rs | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/gpu_display/src/dwl.rs b/gpu_display/src/dwl.rs new file mode 100644 index 0000000..9101c82 --- /dev/null +++ b/gpu_display/src/dwl.rs @@ -0,0 +1,81 @@ +/* automatically generated by rust-bindgen */ + +# [ repr ( C ) ] +# [ derive ( Debug , Copy , Clone ) ] +pub struct dwl_context { + _unused: [u8; 0], +} +# [ repr ( C ) ] +# [ derive ( Debug , Copy , Clone ) ] +pub struct dwl_dmabuf { + _unused: [u8; 0], +} +# [ repr ( C ) ] +# [ derive ( Debug , Copy , Clone ) ] +pub struct dwl_surface { + _unused: [u8; 0], +} +extern "C" { + pub fn dwl_context_new() -> *mut dwl_context; +} +extern "C" { + pub fn dwl_context_destroy(self_: *mut *mut dwl_context); +} +extern "C" { + pub fn dwl_context_setup(self_: *mut dwl_context) -> bool; +} +extern "C" { + pub fn dwl_context_fd(self_: *mut dwl_context) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn dwl_context_dispatch(self_: *mut dwl_context); +} +extern "C" { + pub fn dwl_context_dmabuf_new(self_: *mut dwl_context, + fd: ::std::os::raw::c_int, + offset: u32, + stride: u32, + modifiers: u64, + width: u32, + height: u32, + fourcc: u32) + -> *mut dwl_dmabuf; +} +extern "C" { + pub fn dwl_dmabuf_in_use(self_: *mut dwl_dmabuf) -> bool; +} +extern "C" { + pub fn dwl_dmabuf_destroy(self_: *mut *mut dwl_dmabuf); +} +extern "C" { + pub fn dwl_context_surface_new(self_: *mut dwl_context, + parent: *mut dwl_surface, + shm_fd: ::std::os::raw::c_int, + shm_size: usize, + buffer_size: usize, + width: u32, + height: u32, + stride: u32) + -> *mut dwl_surface; +} +extern "C" { + pub fn dwl_surface_destroy(self_: *mut *mut dwl_surface); +} +extern "C" { + pub fn dwl_surface_commit(self_: *mut dwl_surface); +} +extern "C" { + pub fn dwl_surface_buffer_in_use(self_: *mut dwl_surface, buffer_index: usize) -> bool; +} +extern "C" { + pub fn dwl_surface_flip(self_: *mut dwl_surface, buffer_index: usize); +} +extern "C" { + pub fn dwl_surface_flip_to(self_: *mut dwl_surface, dmabuf: *mut dwl_dmabuf); +} +extern "C" { + pub fn dwl_surface_close_requested(self_: *const dwl_surface) -> bool; +} +extern "C" { + pub fn dwl_surface_set_position(self_: *mut dwl_surface, x: u32, y: u32); +} \ No newline at end of file |