This commit is contained in:
elwrcl committed 2026-06-06 13:25:15 +03:00
1 parent 04d4dc8b09
commit 818cab85dc
12511 files changed
+6156641

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
The Android NDK doesn't come with enough of the platform libraries we
need to build Mesa drivers out of tree, so android_stub has stub
versions of those library that aren't installed which we link against,
relying on the real libraries to be present when the Mesa driver is
deployed.
+14
View File
@@ -0,0 +1,14 @@
#include <backtrace/Backtrace.h>
Backtrace*
Backtrace::Create(pid_t pid, pid_t tid, BacktraceMap* map)
{
return NULL;
}
std::string
backtrace_map_t::Name() const
{
return "";
}
+10
View File
@@ -0,0 +1,10 @@
#include <hardware/hardware.h>
extern "C" {
int hw_get_module(const char *id, const struct hw_module_t **module)
{
return 0;
}
}
+15
View File
@@ -0,0 +1,15 @@
#include <android/log.h>
extern "C" {
int __android_log_write(int prio, const char* tag, const char* text)
{
return 0;
}
int __android_log_print(int prio, const char* tag, const char* fmt, ...)
{
return 0;
}
}
+21
View File
@@ -0,0 +1,21 @@
if with_android_stub
stub_libs = []
lib_names = ['hardware', 'log', 'nativewindow', 'sync']
if with_libbacktrace
lib_names += ['backtrace']
endif
foreach lib : lib_names
stub_libs += shared_library(
lib,
files(lib + '_stub.cpp'),
include_directories : inc_include,
install : false,
)
endforeach
dep_android = declare_dependency(
link_with : stub_libs,
)
endif
+111
View File
@@ -0,0 +1,111 @@
#include <vndk/window.h>
#include <vndk/hardware_buffer.h>
extern "C" {
AHardwareBuffer *
ANativeWindowBuffer_getHardwareBuffer(ANativeWindowBuffer *anwb)
{
return nullptr;
}
void
AHardwareBuffer_acquire(AHardwareBuffer *buffer)
{
}
void
AHardwareBuffer_release(AHardwareBuffer *buffer)
{
}
void
AHardwareBuffer_describe(const AHardwareBuffer *buffer,
AHardwareBuffer_Desc *outDesc)
{
}
int
AHardwareBuffer_allocate(const AHardwareBuffer_Desc *desc,
AHardwareBuffer **outBuffer)
{
return 0;
}
int
AHardwareBuffer_isSupported(const AHardwareBuffer_Desc* desc)
{
return 0;
}
const native_handle_t *
AHardwareBuffer_getNativeHandle(const AHardwareBuffer *buffer)
{
return NULL;
}
void
ANativeWindow_acquire(ANativeWindow *window)
{
}
void
ANativeWindow_release(ANativeWindow *window)
{
}
int32_t
ANativeWindow_getFormat(ANativeWindow *window)
{
return 0;
}
int
ANativeWindow_setSwapInterval(ANativeWindow *window, int interval)
{
return 0;
}
int
ANativeWindow_query(const ANativeWindow *window,
ANativeWindowQuery query,
int *value)
{
return 0;
}
int
ANativeWindow_dequeueBuffer(ANativeWindow *window,
ANativeWindowBuffer **buffer,
int *fenceFd)
{
return 0;
}
int
ANativeWindow_queueBuffer(ANativeWindow *window,
ANativeWindowBuffer *buffer,
int fenceFd)
{
return 0;
}
int ANativeWindow_cancelBuffer(ANativeWindow* window,
ANativeWindowBuffer* buffer,
int fenceFd) {
return 0;
}
int
ANativeWindow_setUsage(ANativeWindow *window, uint64_t usage)
{
return 0;
}
int
ANativeWindow_setSharedBufferMode(ANativeWindow *window,
bool sharedBufferMode)
{
return 0;
}
}
+25
View File
@@ -0,0 +1,25 @@
#include <sync/sync.h>
extern "C" {
/* timeout in msecs */
int sync_wait(int fd, int timeout)
{
return 0;
}
int sync_merge(const char *name, int fd, int fd2)
{
return 0;
}
struct sync_file_info* sync_file_info(int32_t fd)
{
return nullptr;
}
void sync_file_info_free(struct sync_file_info* info)
{
}
}