mirror of
https://github.com/Anything-at-25-00/android_device_tecno_LG8n.git
synced 2024-11-22 21:56:26 -08:00
LG8n:libshims: Add android::GraphicBufferMapper::lock shim
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
This commit is contained in:
parent
773cecf070
commit
d5230ff22d
17
libshims/libshim_ui/Android.bp
Normal file
17
libshims/libshim_ui/Android.bp
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
//
|
||||||
|
// Copyright (C) 2024 The LineageOS Project
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
//
|
||||||
|
|
||||||
|
cc_library_shared {
|
||||||
|
name: "libshim_ui",
|
||||||
|
shared_libs: [
|
||||||
|
"libui",
|
||||||
|
"libutils",
|
||||||
|
],
|
||||||
|
srcs: [
|
||||||
|
"GraphicBufferMapper.cpp",
|
||||||
|
],
|
||||||
|
system_ext_specific: true,
|
||||||
|
}
|
22
libshims/libshim_ui/GraphicBufferMapper.cpp
Normal file
22
libshims/libshim_ui/GraphicBufferMapper.cpp
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <ui/GraphicBufferMapper.h>
|
||||||
|
#include <ui/Rect.h>
|
||||||
|
#include <utils/Errors.h>
|
||||||
|
|
||||||
|
using android::Rect;
|
||||||
|
using android::status_t;
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
status_t _ZN7android19GraphicBufferMapper4lockEPK13native_handlejRKNS_4RectEPPvPiS9_(
|
||||||
|
void* thisptr, buffer_handle_t handle, uint32_t usage, const Rect& bounds, void** vaddr,
|
||||||
|
int32_t* /*outBytesPerPixel*/, int32_t* /*outBytesPerStride*/) {
|
||||||
|
auto* gpm = static_cast<android::GraphicBufferMapper*>(thisptr);
|
||||||
|
return gpm->lock(handle, usage, bounds, vaddr);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue