Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
google
GitHub Repository: google/crosvm
Path: blob/main/gpu_display/src/gpu_display_android_stub.rs
5394 views
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
11
use std::ffi::c_char;
12
13
use crate::gpu_display_android::AHardwareBufferInfo;
14
use crate::gpu_display_android::ANativeWindow_Buffer;
15
use crate::gpu_display_android::AndroidDisplayContext;
16
use crate::gpu_display_android::AndroidDisplaySurface;
17
use crate::gpu_display_android::ErrorCallback;
18
19
#[no_mangle]
20
extern "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]
28
extern "C" fn destroy_android_display_context(_ctx: *mut AndroidDisplayContext) {
29
unimplemented!();
30
}
31
32
#[no_mangle]
33
extern "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]
43
extern "C" fn destroy_android_surface(
44
_ctx: *mut AndroidDisplayContext,
45
_surface: *mut AndroidDisplaySurface,
46
) {
47
unimplemented!();
48
}
49
50
#[no_mangle]
51
extern "C" fn set_android_surface_position(_ctx: *mut AndroidDisplayContext, _x: u32, _y: u32) {
52
unimplemented!();
53
}
54
55
#[no_mangle]
56
extern "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]
65
extern "C" fn post_android_surface_buffer(
66
_ctx: *mut AndroidDisplayContext,
67
_surface: *mut AndroidDisplaySurface,
68
) {
69
unimplemented!();
70
}
71
72
#[no_mangle]
73
extern "C" fn android_display_flip_to(
74
_ctx: *mut AndroidDisplayContext,
75
_surface: *mut AndroidDisplaySurface,
76
_ahb_info: *const AHardwareBufferInfo,
77
) {
78
unimplemented!();
79
}
80
81