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

Commit ea458286 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Remove some comments regarding caching protected buffers

We thought we'd be able to share buffers across contexts but by trial
and error (i.e. the bugs listed below) we've found that we cannot.

Bug: 242266174
Bug: 294357792
Bug: 271907068
Bug: 264475961
Bug: 267295152
Test: These are just comment changes.
Change-Id: I52e1d831f2d195cddb21c2e7a1e820059fe2a137
parent d1dfe290
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -405,9 +405,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>