gpu_display/
gpu_display_android_stub.rs

1// Copyright 2024 The ChromiumOS Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5//! Stub implementation of the native interface of libcrosvm_android_display_client
6//!
7//! This implementation is used to enable the gpu display backend for Android to be compiled
8//! without libcrosvm_android_display_client available. It is only used for testing purposes and
9//! not functional at runtime.
10
11use std::ffi::c_char;
12
13use crate::gpu_display_android::AHardwareBufferInfo;
14use crate::gpu_display_android::ANativeWindow_Buffer;
15use crate::gpu_display_android::AndroidDisplayContext;
16use crate::gpu_display_android::AndroidDisplaySurface;
17use crate::gpu_display_android::ErrorCallback;
18
19#[no_mangle]
20extern "C" fn create_android_display_context(
21    _name: *const c_char,
22    _error_callback: ErrorCallback,
23) -> *mut AndroidDisplayContext {
24    unimplemented!();
25}
26
27#[no_mangle]
28extern "C" fn destroy_android_display_context(_ctx: *mut AndroidDisplayContext) {
29    unimplemented!();
30}
31
32#[no_mangle]
33extern "C" fn create_android_surface(
34    _ctx: *mut AndroidDisplayContext,
35    _width: u32,
36    _height: u32,
37    _for_cursor: bool,
38) -> *mut AndroidDisplaySurface {
39    unimplemented!();
40}
41
42#[no_mangle]
43extern "C" fn destroy_android_surface(
44    _ctx: *mut AndroidDisplayContext,
45    _surface: *mut AndroidDisplaySurface,
46) {
47    unimplemented!();
48}
49
50#[no_mangle]
51extern "C" fn set_android_surface_position(_ctx: *mut AndroidDisplayContext, _x: u32, _y: u32) {
52    unimplemented!();
53}
54
55#[no_mangle]
56extern "C" fn get_android_surface_buffer(
57    _ctx: *mut AndroidDisplayContext,
58    _surface: *mut AndroidDisplaySurface,
59    _out_buffer: *mut ANativeWindow_Buffer,
60) -> u32 {
61    unimplemented!();
62}
63
64#[no_mangle]
65extern "C" fn post_android_surface_buffer(
66    _ctx: *mut AndroidDisplayContext,
67    _surface: *mut AndroidDisplaySurface,
68) {
69    unimplemented!();
70}
71
72#[no_mangle]
73extern "C" fn android_display_flip_to(
74    _ctx: *mut AndroidDisplayContext,
75    _surface: *mut AndroidDisplaySurface,
76    _ahb_info: *const AHardwareBufferInfo,
77) {
78    unimplemented!();
79}