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

Commit ad2db94d authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove some comments regarding caching protected buffers" into main

parents f269a1de ea458286
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -420,9 +420,7 @@ void SkiaRenderEngine::mapExternalTextureBuffer(const sp<GraphicBuffer>& buffer,

    // If we were to support caching protected buffers then we will need to switch the
    // currently bound context if we are not already using the protected context (and subsequently
    // switch back after the buffer is cached).  However, for non-protected content we can bind
    // the texture in either GL context because they are initialized with the same share_context
    // which allows the texture state to be shared between them.
    // switch back after the buffer is cached).
    auto context = getActiveContext();
    auto& cache = mTextureCache;

+0 −3
Original line number Diff line number Diff line
@@ -168,9 +168,6 @@ private:
    // Number of external holders of ExternalTexture references, per GraphicBuffer ID.
    std::unordered_map<GraphicBufferId, int32_t> mGraphicBufferExternalRefs
            GUARDED_BY(mRenderingMutex);
    // For GL, this cache is shared between protected and unprotected contexts. For Vulkan, it is
    // only used for the unprotected context, because Vulkan does not allow sharing between
    // contexts, and protected is less common.
    std::unordered_map<GraphicBufferId, std::shared_ptr<AutoBackendTexture::LocalRef>> mTextureCache
            GUARDED_BY(mRenderingMutex);
    std::unordered_map<shaders::LinearEffect, sk_sp<SkRuntimeEffect>, shaders::LinearEffectHasher>