aboutsummaryrefslogtreecommitdiff
path: root/gpu_display/src/gpu_display_wl.rs
diff options
context:
space:
mode:
authorFrederick Mayle <fmayle@google.com>2024-04-12 15:36:54 -0700
committerFrederick Mayle <fmayle@google.com>2024-04-15 13:00:06 -0700
commitc223989d8457ecb2345a8d2831d8a1e599abcb0c (patch)
tree682de9eb6a3f88e0d15f30445ba3e0ec296edf6c /gpu_display/src/gpu_display_wl.rs
parent3eba8661914b15dc34bde33d6a8201cfc76c7675 (diff)
parentb0967c6b2e6e17d23a50bb91c08c9bf712cffd00 (diff)
downloadcrosvm-c223989d8457ecb2345a8d2831d8a1e599abcb0c.tar.gz
Merge remote-tracking branch 'aosp/upstream-main'
Had to update the rust version to compile the new nix version. The metrics protos have been deleted upstream, so those `out` files are deleted (and we don't need to `sed` them in the script). Added default_team for `hypervisor` to satisify a lint error, will add it everywhere else later. * aosp/upstream-main: (86 commits) Roll recipe dependencies (trivial). devices: vhost-user: fix test flake Roll recipe dependencies (trivial). Cargo.lock: switch to tokio 1.29.1 Roll recipe dependencies (trivial). Roll recipe dependencies (trivial). Roll recipe dependencies (trivial). cros_async: Tokio IoSource for windows cros_async: Add AsyncFd to Tokio linux implementation cros_async: Blocking tokio executor for linux devices: Fix nested executor invocation in async virtio-console cros_async: Move `concurrency` to Overlapped enum Roll recipe dependencies (trivial). Create a minimal virtualization and hypervisor integration test. gpu_display: add max_num_displays to GpuParameters. Roll recipe dependencies (trivial). Roll recipe dependencies (trivial). Roll recipe dependencies (trivial). Refactor android display backend e2e_tests: wait for restore to complete before sending commands ... Bug: 332584046 Test: TH Change-Id: I25dd0124d719a59c312ba31f060c1b37f1d2a1b6
Diffstat (limited to 'gpu_display/src/gpu_display_wl.rs')
-rw-r--r--gpu_display/src/gpu_display_wl.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/gpu_display/src/gpu_display_wl.rs b/gpu_display/src/gpu_display_wl.rs
index 61a7f9b9b..c163ee7ed 100644
--- a/gpu_display/src/gpu_display_wl.rs
+++ b/gpu_display/src/gpu_display_wl.rs
@@ -32,6 +32,7 @@ use base::VolatileMemory;
use dwl::*;
use linux_input_sys::virtio_input_event;
use sync::Waitable;
+use vm_control::gpu::DisplayParameters;
use crate::DisplayExternalResourceImport;
use crate::DisplayT;
@@ -376,12 +377,12 @@ impl DisplayT for DisplayWl {
parent_surface_id: Option<u32>,
surface_id: u32,
scanout_id: Option<u32>,
- width: u32,
- height: u32,
+ display_params: &DisplayParameters,
surf_type: SurfaceType,
) -> GpuDisplayResult<Box<dyn GpuDisplaySurface>> {
let parent_id = parent_surface_id.unwrap_or(0);
+ let (width, height) = display_params.get_virtual_display_size();
let row_size = width * BYTES_PER_PIXEL;
let fb_size = row_size * height;
let buffer_size = round_up_to_page_size(fb_size as usize * BUFFER_COUNT);