libui: Fix android::GraphicBuffer::lock return value

Change-Id: I2c439c74d594959f1612c672ac685388a5386d4d
This commit is contained in:
Sebastiano Barezzi 2023-07-17 12:10:27 +02:00
parent d67ae54f8e
commit 2318cd6f47
No known key found for this signature in database
GPG key ID: 763BD3AE91A7A13F
2 changed files with 14 additions and 7 deletions

View file

@ -1,5 +1,5 @@
//
// Copyright (C) 2022 The LineageOS Project
// Copyright (C) 2022-2023 The LineageOS Project
//
// SPDX-License-Identifier: Apache-2.0
//
@ -297,7 +297,10 @@ cc_library_shared {
cc_library_shared {
name: "libui_shim",
shared_libs: ["libui"],
shared_libs: [
"libui",
"libutils",
],
srcs: [
"libui/Fence.cpp",
"libui/GraphicBuffer.cpp",

View file

@ -5,12 +5,16 @@
*/
#include <stdint.h>
#include <utils/Errors.h>
extern "C" void* _ZN7android13GraphicBuffer4lockEjPPvPiS3_(void* thisptr, uint32_t inUsage,
void** vaddr, int32_t* outBytesPerPixel,
int32_t* outBytesPerStride);
using android::status_t;
extern "C" void* _ZN7android13GraphicBuffer4lockEjPPv(void* thisptr, uint32_t inUsage,
void** vaddr) {
extern "C" status_t _ZN7android13GraphicBuffer4lockEjPPvPiS3_(void* thisptr, uint32_t inUsage,
void** vaddr,
int32_t* outBytesPerPixel,
int32_t* outBytesPerStride);
extern "C" status_t _ZN7android13GraphicBuffer4lockEjPPv(void* thisptr, uint32_t inUsage,
void** vaddr) {
return _ZN7android13GraphicBuffer4lockEjPPvPiS3_(thisptr, inUsage, vaddr, nullptr, nullptr);
}