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

Commit 20836a57 authored by Alec Mouri's avatar Alec Mouri Committed by Android (Google) Code Review
Browse files

Merge "Don't import GPU inaccessible buffers in RenderEngine" into main

parents c79a756a 07196db2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -400,7 +400,10 @@ void SkiaRenderEngine::mapExternalTextureBuffer(const sp<GraphicBuffer>& buffer,
    // simply match the existing behavior for protected buffers.)  We also never cache any
    // buffers while in a protected context.
    const bool isProtectedBuffer = buffer->getUsage() & GRALLOC_USAGE_PROTECTED;
    if (isProtectedBuffer || isProtected()) {
    // Don't attempt to map buffers if we're not gpu sampleable. Callers shouldn't send a buffer
    // over to RenderEngine.
    const bool isGpuSampleable = buffer->getUsage() & GRALLOC_USAGE_HW_TEXTURE;
    if (isProtectedBuffer || isProtected() || !isGpuSampleable) {
        return;
    }
    ATRACE_CALL();