Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cba29346 authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Add IMapper 5 implementation"

parents 443294c0 0ff95c9b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ cc_defaults {
        integer_overflow: true,
        misc_undefined: ["bounds"],
    },

}

cc_library_static {
@@ -135,6 +134,7 @@ cc_library_shared {
        "Gralloc2.cpp",
        "Gralloc3.cpp",
        "Gralloc4.cpp",
        "Gralloc5.cpp",
        "GraphicBuffer.cpp",
        "GraphicBufferAllocator.cpp",
        "GraphicBufferMapper.cpp",
@@ -176,6 +176,7 @@ cc_library_shared {
        "libsync",
        "libutils",
        "liblog",
        "libvndksupport",
    ],

    export_shared_lib_headers: [
@@ -214,6 +215,8 @@ cc_library_shared {
        "libnativewindow_headers",
        "libhardware_headers",
        "libui_headers",
        "libimapper_stablec",
        "libimapper_providerutils",
    ],

    export_static_lib_headers: [
+1 −1
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ status_t Gralloc2Mapper::createDescriptor(void* bufferDescriptorInfo,
    return static_cast<status_t>((ret.isOk()) ? error : kTransactionError);
}

status_t Gralloc2Mapper::importBuffer(const hardware::hidl_handle& rawHandle,
status_t Gralloc2Mapper::importBuffer(const native_handle_t* rawHandle,
                                      buffer_handle_t* outBufferHandle) const {
    Error error;
    auto ret = mMapper->importBuffer(rawHandle,
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ status_t Gralloc3Mapper::createDescriptor(void* bufferDescriptorInfo,
    return static_cast<status_t>((ret.isOk()) ? error : kTransactionError);
}

status_t Gralloc3Mapper::importBuffer(const hardware::hidl_handle& rawHandle,
status_t Gralloc3Mapper::importBuffer(const native_handle_t* rawHandle,
                                      buffer_handle_t* outBufferHandle) const {
    Error error;
    auto ret = mMapper->importBuffer(rawHandle, [&](const auto& tmpError, const auto& tmpBuffer) {
+4 −1
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ status_t Gralloc4Mapper::createDescriptor(void* bufferDescriptorInfo,
    return static_cast<status_t>((ret.isOk()) ? error : kTransactionError);
}

status_t Gralloc4Mapper::importBuffer(const hardware::hidl_handle& rawHandle,
status_t Gralloc4Mapper::importBuffer(const native_handle_t* rawHandle,
                                      buffer_handle_t* outBufferHandle) const {
    Error error;
    auto ret = mMapper->importBuffer(rawHandle, [&](const auto& tmpError, const auto& tmpBuffer) {
@@ -1233,7 +1233,10 @@ status_t Gralloc4Allocator::allocate(std::string requestorName, uint32_t width,

    if (mAidlAllocator) {
        AllocationResult result;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
        auto status = mAidlAllocator->allocate(descriptor, bufferCount, &result);
#pragma clang diagnostic pop // deprecation
        if (!status.isOk()) {
            error = status.getExceptionCode();
            if (error == EX_SERVICE_SPECIFIC) {

libs/ui/Gralloc5.cpp

0 → 100644
+903 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading