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

Commit 818f4412 authored by David Stevens's avatar David Stevens Committed by Automerger Merge Worker
Browse files

Merge "codec2: Fix linear gralloc blobs" into rvc-dev am: d714ed75 am: cd769b3f am: df9f7fd8

Change-Id: Iefc8a71dbac91269bbb5db249e0f5e38387e0c64
parents e066d7c8 df9f7fd8
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -520,6 +520,22 @@ c2_status_t C2AllocationGralloc::map(
            break;
        }

        case static_cast<uint32_t>(PixelFormat4::BLOB): {
            void *pointer = nullptr;
            // TODO: fence
            status_t err = GraphicBufferMapper::get().lock(
                                const_cast<native_handle_t*>(mBuffer), grallocUsage,
                                { (int32_t)rect.left, (int32_t)rect.top,
                                  (int32_t)rect.width, (int32_t)rect.height },
                                &pointer);
            if (err) {
                ALOGE("failed transaction: lock(BLOB)");
                return C2_CORRUPTED;
            }
            *addr = (uint8_t *)pointer;
            break;
        }

        case static_cast<uint32_t>(PixelFormat4::YCBCR_420_888):
            // fall-through
        case static_cast<uint32_t>(PixelFormat4::YV12):