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

Commit 01c19038 authored by Wonsik Kim's avatar Wonsik Kim Committed by Android (Google) Code Review
Browse files

Merge "CCodecBufferChannel: skip output slot check if the block pool can throttle" into udc-dev

parents 38f74691 3722abc4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -167,6 +167,7 @@ CCodecBufferChannel::CCodecBufferChannel(
        Mutexed<Output>::Locked output(mOutput);
        output->outputDelay = 0u;
        output->numSlots = kSmoothnessFactor;
        output->bounded = false;
    }
    {
        Mutexed<BlockPools>::Locked pools(mBlockPools);
@@ -727,7 +728,7 @@ void CCodecBufferChannel::feedInputBufferIfAvailableInternal() {
        Mutexed<Output>::Locked output(mOutput);
        if (!output->buffers ||
                output->buffers->hasPending() ||
                output->buffers->numActiveSlots() >= output->numSlots) {
                (!output->bounded && output->buffers->numActiveSlots() >= output->numSlots)) {
            return;
        }
    }
@@ -1509,6 +1510,7 @@ status_t CCodecBufferChannel::start(
        Mutexed<Output>::Locked output(mOutput);
        output->outputDelay = outputDelayValue;
        output->numSlots = numOutputSlots;
        output->bounded = bool(outputSurface);
        if (graphic) {
            if (outputSurface || !buffersBoundToCodec) {
                output->buffers.reset(new GraphicOutputBuffers(mName));
+3 −0
Original line number Diff line number Diff line
@@ -321,6 +321,9 @@ private:
        std::unique_ptr<OutputBuffers> buffers;
        size_t numSlots;
        uint32_t outputDelay;
        // true iff the underlying block pool is bounded --- for example,
        // a BufferQueue-based block pool would be bounded by the BufferQueue.
        bool bounded;
    };
    Mutexed<Output> mOutput;
    Mutexed<std::list<std::unique_ptr<C2Work>>> mFlushedConfigs;