gfxstream: fix build

API for export_resource changed

Bug: b/146066070
Change-Id: I614880704658bbe7aae2f7ad8b10c76555d99c1f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2102760
Tested-by: Lingfeng Yang <lfy@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Jason Macnak <natsu@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
This commit is contained in:
Lingfeng Yang 2020-03-13 09:06:50 -07:00 committed by Commit Bot
parent 45a94bedae
commit 22964eab88

View file

@ -10,7 +10,6 @@
use std::cell::RefCell; use std::cell::RefCell;
use std::collections::btree_map::Entry; use std::collections::btree_map::Entry;
use std::collections::BTreeMap as Map; use std::collections::BTreeMap as Map;
use std::fs::File;
use std::mem::transmute; use std::mem::transmute;
use std::os::raw::{c_char, c_int, c_uchar, c_uint, c_void}; use std::os::raw::{c_char, c_int, c_uchar, c_uint, c_void};
use std::panic; use std::panic;
@ -27,6 +26,7 @@ use vm_control::VmMemoryControlRequestSocket;
use super::protocol::GpuResponse; use super::protocol::GpuResponse;
pub use super::virtio_backend::{VirtioBackend, VirtioResource}; pub use super::virtio_backend::{VirtioBackend, VirtioResource};
use crate::virtio::gpu::{Backend, DisplayBackend, VIRTIO_F_VERSION_1, VIRTIO_GPU_F_VIRGL}; use crate::virtio::gpu::{Backend, DisplayBackend, VIRTIO_F_VERSION_1, VIRTIO_GPU_F_VIRGL};
use crate::virtio::resource_bridge::ResourceResponse;
// C definitions related to gfxstream // C definitions related to gfxstream
// In gfxstream, only write_fence is used // In gfxstream, only write_fence is used
@ -340,8 +340,8 @@ impl Backend for VirtioGfxStreamBackend {
} }
/// If supported, export the resource with the given id to a file. /// If supported, export the resource with the given id to a file.
fn export_resource(&mut self, _id: u32) -> Option<File> { fn export_resource(&mut self, _id: u32) -> ResourceResponse {
None ResourceResponse::Invalid
} }
/// Creates a fence with the given id that can be used to determine when the previous command /// Creates a fence with the given id that can be used to determine when the previous command