libui: Re-add android::GraphicBufferMapper::lock shims
* Commit Ib4590b7a3b839a993f6c747c5f09a6312f7ab329 restored GraphicBufferMapper::lock old overload, but some libs still require the new one. Change-Id: Ie1435961dc43f7750a80b9986977194835d916f3
This commit is contained in:
parent
a723dd3d79
commit
5206a0f0a5
2 changed files with 23 additions and 0 deletions
|
@ -401,6 +401,7 @@ cc_library_shared {
|
|||
srcs: [
|
||||
"libui/Fence.cpp",
|
||||
"libui/GraphicBuffer.cpp",
|
||||
"libui/GraphicBufferMapper.cpp",
|
||||
],
|
||||
system_ext_specific: true,
|
||||
vendor_available: true,
|
||||
|
|
22
libui/GraphicBufferMapper.cpp
Normal file
22
libui/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