mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
f5285c647a
This change adds an X11 backend to the gpu_display crate. With this addition, the virtio-gpu device can display to traditional linux desktops that only have X11 output. Change-Id: I86c80cac91ca5bdc97588194a44040273ae69385 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1591572 Reviewed-by: Stéphane Marchesin <marcheu@chromium.org> Commit-Queue: Zach Reizner <zachr@chromium.org> Tested-by: Zach Reizner <zachr@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Auto-Submit: Zach Reizner <zachr@chromium.org>
15 lines
481 B
Rust
15 lines
481 B
Rust
// Copyright 2019 The Chromium OS Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
use gpu_display::*;
|
|
|
|
fn main() {
|
|
let mut disp = GpuDisplay::open_wayland(None::<&str>).unwrap();
|
|
let surface_id = disp.create_surface(None, 1280, 1024).unwrap();
|
|
disp.flip(surface_id);
|
|
disp.commit(surface_id);
|
|
while !disp.close_requested(surface_id) {
|
|
disp.dispatch_events();
|
|
}
|
|
}
|