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

Commit 0f3d50b4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Codec2: vndk: lock P010 with gralloc4 mapper first" am: 7df4f8c3 am:...

Merge "Codec2: vndk: lock P010 with gralloc4 mapper first" am: 7df4f8c3 am: 062e0be1 am: b1b87345 am: 9ad4ed36

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2138496



Change-Id: I61b605294d7163c5dcc54ddf568e910920bbd250
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents f967c3b3 9ad4ed36
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -706,6 +706,14 @@ c2_status_t C2AllocationGralloc::map(
        }

        case static_cast<uint32_t>(PixelFormat4::YCBCR_P010): {
            // In Android T, P010 is relaxed to allow arbitrary stride for the Y and UV planes,
            // try locking with the gralloc4 mapper first.
            c2_status_t status = Gralloc4Mapper_lock(
                    const_cast<native_handle_t*>(mBuffer), grallocUsage, rect, layout, addr);
            if (status == C2_OK) {
                break;
            }

            void *pointer = nullptr;
            status_t err = GraphicBufferMapper::get().lock(
                    const_cast<native_handle_t *>(mBuffer), grallocUsage, rect, &pointer);