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::ANativeWindow_Buffer;
14use crate::gpu_display_android::AndroidDisplayContext;
15use crate::gpu_display_android::AndroidDisplaySurface;
16use crate::gpu_display_android::ErrorCallback;
17
18#[no_mangle]
19extern "C" fn create_android_display_context(
20    _name: *const c_char,
21    _error_callback: ErrorCallback,
22) -> *mut AndroidDisplayContext {
23    unimplemented!();
24}
25
26#[no_mangle]
27extern "C" fn destroy_android_display_context(_ctx: *mut AndroidDisplayContext) {
28    unimplemented!();
29}
30
31#[no_mangle]
32extern "C" fn create_android_surface(
33    _ctx: *mut AndroidDisplayContext,
34    _width: u32,
35    _height: u32,
36    _for_cursor: bool,
37) -> *mut AndroidDisplaySurface {
38    unimplemented!();
39}
40
41#[no_mangle]
42extern "C" fn destroy_android_surface(
43    _ctx: *mut AndroidDisplayContext,
44    _surface: *mut AndroidDisplaySurface,
45) {
46    unimplemented!();
47}
48
49#[no_mangle]
50extern "C" fn set_android_surface_position(_ctx: *mut AndroidDisplayContext, _x: u32, _y: u32) {
51    unimplemented!();
52}
53
54#[no_mangle]
55extern "C" fn get_android_surface_buffer(
56    _ctx: *mut AndroidDisplayContext,
57    _surface: *mut AndroidDisplaySurface,
58    _out_buffer: *mut ANativeWindow_Buffer,
59) -> u32 {
60    unimplemented!();
61}
62
63#[no_mangle]
64extern "C" fn post_android_surface_buffer(
65    _ctx: *mut AndroidDisplayContext,
66    _surface: *mut AndroidDisplaySurface,
67) {
68    unimplemented!();
69}