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

Commit ac8611db authored by Dan Stoza's avatar Dan Stoza Committed by Android Git Automerger
Browse files

am f984bad9: Merge "Fix PTS handling for buffer replacement"

* commit 'f984bad9':
  Fix PTS handling for buffer replacement
parents a1f8b324 f984bad9
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ public:
    // returned.  The presentation time is in nanoseconds, and the time base
    // is CLOCK_MONOTONIC.
    virtual status_t acquireBuffer(BufferItem* outBuffer,
            nsecs_t expectedPresent);
            nsecs_t expectedPresent, uint64_t maxFrameNumber = 0) override;

    // See IGraphicBufferConsumer::detachBuffer
    virtual status_t detachBuffer(int slot);
@@ -148,9 +148,6 @@ public:
    // Retrieve the sideband buffer stream, if any.
    virtual sp<NativeHandle> getSidebandStream() const;

    // See IGraphicBufferConsumer::setShadowQueueSize
    virtual void setShadowQueueSize(size_t size);

    // dump our state in a String
    virtual void dump(String8& result, const char* prefix) const;

+0 −6
Original line number Diff line number Diff line
@@ -275,12 +275,6 @@ private:
    // buffer as the number of frames that have elapsed since it was last queued
    uint64_t mBufferAge;

    // mConsumerHasShadowQueue determines if acquireBuffer should be more
    // cautious about dropping buffers so that it always returns a buffer that
    // is represented in the consumer's shadow queue.
    bool mConsumerHasShadowQueue;
    size_t mConsumerShadowQueueSize;

}; // class BufferQueueCore

} // namespace android
+2 −1
Original line number Diff line number Diff line
@@ -152,7 +152,8 @@ protected:
    // initialization that must take place the first time a buffer is assigned
    // to a slot.  If it is overridden the derived class's implementation must
    // call ConsumerBase::acquireBufferLocked.
    virtual status_t acquireBufferLocked(BufferItem *item, nsecs_t presentWhen);
    virtual status_t acquireBufferLocked(BufferItem *item, nsecs_t presentWhen,
            uint64_t maxFrameNumber = 0);

    // releaseBufferLocked relinquishes control over a buffer, returning that
    // control to the BufferQueue.
+2 −1
Original line number Diff line number Diff line
@@ -241,7 +241,8 @@ protected:

    // acquireBufferLocked overrides the ConsumerBase method to update the
    // mEglSlots array in addition to the ConsumerBase behavior.
    virtual status_t acquireBufferLocked(BufferItem *item, nsecs_t presentWhen);
    virtual status_t acquireBufferLocked(BufferItem *item, nsecs_t presentWhen,
            uint64_t maxFrameNumber = 0) override;

    // releaseBufferLocked overrides the ConsumerBase method to update the
    // mEglSlots array in addition to the ConsumerBase.
+8 −6
Original line number Diff line number Diff line
@@ -69,6 +69,12 @@ public:
    // returned.  The presentation time is in nanoseconds, and the time base
    // is CLOCK_MONOTONIC.
    //
    // If maxFrameNumber is non-zero, it indicates that acquireBuffer should
    // only return a buffer with a frame number less than or equal to
    // maxFrameNumber. If no such frame is available (such as when a buffer has
    // been replaced but the consumer has not received the onFrameReplaced
    // callback), then PRESENT_LATER will be returned.
    //
    // Return of NO_ERROR means the operation completed as normal.
    //
    // Return of a positive value means the operation could not be completed
@@ -78,7 +84,8 @@ public:
    //
    // Return of a negative value means an error has occurred:
    // * INVALID_OPERATION - too many buffers have been acquired
    virtual status_t acquireBuffer(BufferItem* buffer, nsecs_t presentWhen) = 0;
    virtual status_t acquireBuffer(BufferItem* buffer, nsecs_t presentWhen,
            uint64_t maxFrameNumber = 0) = 0;

    // detachBuffer attempts to remove all ownership of the buffer in the given
    // slot from the buffer queue. If this call succeeds, the slot will be
@@ -248,11 +255,6 @@ public:
    // Retrieve the sideband buffer stream, if any.
    virtual sp<NativeHandle> getSidebandStream() const = 0;

    // setShadowQueueSize notifies the BufferQueue that the consumer is
    // shadowing its queue and allows it to limit the number of buffers it is
    // permitted to drop during acquire so as to not get out of sync.
    virtual void setShadowQueueSize(size_t size) = 0;

    // dump state into a string
    virtual void dump(String8& result, const char* prefix) const = 0;

Loading