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

Commit 68322a36 authored by Igor Murashkin's avatar Igor Murashkin Committed by Android Git Automerger
Browse files

am 0ba1a16b: am e60a0b1e: Merge "gui: CpuConsumer::lockNextBuffer change...

am 0ba1a16b: am e60a0b1e: Merge "gui: CpuConsumer::lockNextBuffer change return code when too many bufs acquired" into klp-dev

* commit '0ba1a16b':
  gui: CpuConsumer::lockNextBuffer change return code when too many bufs acquired
parents ddb7ae42 0ba1a16b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ class CpuConsumer : public ConsumerBase
    // Gets the next graphics buffer from the producer and locks it for CPU use,
    // filling out the passed-in locked buffer structure with the native pointer
    // and metadata. Returns BAD_VALUE if no new buffer is available, and
    // INVALID_OPERATION if the maximum number of buffers is already locked.
    // NOT_ENOUGH_DATA if the maximum number of buffers is already locked.
    //
    // Only a fixed number of buffers can be locked at a time, determined by the
    // construction-time maxLockedBuffers parameter. If INVALID_OPERATION is
+3 −1
Original line number Diff line number Diff line
@@ -72,7 +72,9 @@ status_t CpuConsumer::lockNextBuffer(LockedBuffer *nativeBuffer) {

    if (!nativeBuffer) return BAD_VALUE;
    if (mCurrentLockedBuffers == mMaxLockedBuffers) {
        return INVALID_OPERATION;
        CC_LOGW("Max buffers have been locked (%d), cannot lock anymore.",
                mMaxLockedBuffers);
        return NOT_ENOUGH_DATA;
    }

    BufferQueue::BufferItem b;