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

Commit ae00f5c3 authored by Chia-I Wu's avatar Chia-I Wu
Browse files

graphics: sideband streams are not buffers

We should call native_handle_clone instead of IMapper::importBuffer
on sideband stream handles.

Bug: 63707399
Test: manual
Change-Id: Ie07e50f6bb771f3c7a69d29e36f60b149dc6af95
parent be3cb04f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1149,6 +1149,13 @@ Error ComposerClient::CommandReader::lookupBuffer(BufferCache cache,

        // input handle is ignored
        *outHandle = entry->getHandle();
    } else if (cache == BufferCache::LAYER_SIDEBAND_STREAMS) {
        if (handle) {
            *outHandle = native_handle_clone(handle);
            if (*outHandle == nullptr) {
                return Error::NO_RESOURCES;
            }
        }
    } else {
        if (!sHandleImporter.importBuffer(handle)) {
            return Error::NO_RESOURCES;
+1 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ public:
protected:
    struct LayerBuffers {
        std::vector<BufferCacheEntry> Buffers;
        // the handle is a sideband stream handle, not a buffer handle
        BufferCacheEntry SidebandStream;
    };