Loading libs/renderengine/skia/SkiaRenderEngine.cpp +5 −8 Original line number Diff line number Diff line Loading @@ -396,12 +396,10 @@ void SkiaRenderEngine::mapExternalTextureBuffer(const sp<GraphicBuffer>& buffer, } // We don't attempt to map a buffer if the buffer contains protected content. In GL this is // important because GPU resources for protected buffers are much more limited. (In Vk we // simply match the existing behavior for protected buffers.) In Vk, we never cache any // buffers while in a protected context, since Vk cannot share across contexts, and protected // is less common. // 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 || (mRenderEngineType == RenderEngineType::SKIA_VK_THREADED && isProtected())) { if (isProtectedBuffer || isProtected()) { return; } ATRACE_CALL(); Loading Loading @@ -466,9 +464,8 @@ void SkiaRenderEngine::unmapExternalTextureBuffer(sp<GraphicBuffer>&& buffer) { std::shared_ptr<AutoBackendTexture::LocalRef> SkiaRenderEngine::getOrCreateBackendTexture( const sp<GraphicBuffer>& buffer, bool isOutputBuffer) { // Do not lookup the buffer in the cache for protected contexts with the SkiaVk back-end if (mRenderEngineType == RenderEngineType::SKIA_GL_THREADED || (mRenderEngineType == RenderEngineType::SKIA_VK_THREADED && !isProtected())) { // Do not lookup the buffer in the cache for protected contexts if (!isProtected()) { if (const auto& it = mTextureCache.find(buffer->getId()); it != mTextureCache.end()) { return it->second; } Loading Loading
libs/renderengine/skia/SkiaRenderEngine.cpp +5 −8 Original line number Diff line number Diff line Loading @@ -396,12 +396,10 @@ void SkiaRenderEngine::mapExternalTextureBuffer(const sp<GraphicBuffer>& buffer, } // We don't attempt to map a buffer if the buffer contains protected content. In GL this is // important because GPU resources for protected buffers are much more limited. (In Vk we // simply match the existing behavior for protected buffers.) In Vk, we never cache any // buffers while in a protected context, since Vk cannot share across contexts, and protected // is less common. // 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 || (mRenderEngineType == RenderEngineType::SKIA_VK_THREADED && isProtected())) { if (isProtectedBuffer || isProtected()) { return; } ATRACE_CALL(); Loading Loading @@ -466,9 +464,8 @@ void SkiaRenderEngine::unmapExternalTextureBuffer(sp<GraphicBuffer>&& buffer) { std::shared_ptr<AutoBackendTexture::LocalRef> SkiaRenderEngine::getOrCreateBackendTexture( const sp<GraphicBuffer>& buffer, bool isOutputBuffer) { // Do not lookup the buffer in the cache for protected contexts with the SkiaVk back-end if (mRenderEngineType == RenderEngineType::SKIA_GL_THREADED || (mRenderEngineType == RenderEngineType::SKIA_VK_THREADED && !isProtected())) { // Do not lookup the buffer in the cache for protected contexts if (!isProtected()) { if (const auto& it = mTextureCache.find(buffer->getId()); it != mTextureCache.end()) { return it->second; } Loading