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

Commit 09d561db authored by Dan Stoza's avatar Dan Stoza Committed by Android (Google) Code Review
Browse files

Merge "Fix PTS handling for buffer replacement" into mnc-dev

parents 4b4820db a4650a50
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -47,7 +47,7 @@ public:
    // returned.  The presentation time is in nanoseconds, and the time base
    // returned.  The presentation time is in nanoseconds, and the time base
    // is CLOCK_MONOTONIC.
    // is CLOCK_MONOTONIC.
    virtual status_t acquireBuffer(BufferItem* outBuffer,
    virtual status_t acquireBuffer(BufferItem* outBuffer,
            nsecs_t expectedPresent);
            nsecs_t expectedPresent, uint64_t maxFrameNumber = 0) override;


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


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

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


+0 −6
Original line number Original line Diff line number Diff line
@@ -275,12 +275,6 @@ private:
    // buffer as the number of frames that have elapsed since it was last queued
    // buffer as the number of frames that have elapsed since it was last queued
    uint64_t mBufferAge;
    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
}; // class BufferQueueCore


} // namespace android
} // namespace android
+2 −1
Original line number Original line Diff line number Diff line
@@ -152,7 +152,8 @@ protected:
    // initialization that must take place the first time a buffer is assigned
    // 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
    // to a slot.  If it is overridden the derived class's implementation must
    // call ConsumerBase::acquireBufferLocked.
    // 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
    // releaseBufferLocked relinquishes control over a buffer, returning that
    // control to the BufferQueue.
    // control to the BufferQueue.
+2 −1
Original line number Original line Diff line number Diff line
@@ -241,7 +241,8 @@ protected:


    // acquireBufferLocked overrides the ConsumerBase method to update the
    // acquireBufferLocked overrides the ConsumerBase method to update the
    // mEglSlots array in addition to the ConsumerBase behavior.
    // 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
    // releaseBufferLocked overrides the ConsumerBase method to update the
    // mEglSlots array in addition to the ConsumerBase.
    // mEglSlots array in addition to the ConsumerBase.
+8 −6
Original line number Original line Diff line number Diff line
@@ -69,6 +69,12 @@ public:
    // returned.  The presentation time is in nanoseconds, and the time base
    // returned.  The presentation time is in nanoseconds, and the time base
    // is CLOCK_MONOTONIC.
    // 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 NO_ERROR means the operation completed as normal.
    //
    //
    // Return of a positive value means the operation could not be completed
    // 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:
    // Return of a negative value means an error has occurred:
    // * INVALID_OPERATION - too many buffers have been acquired
    // * 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
    // 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
    // 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.
    // Retrieve the sideband buffer stream, if any.
    virtual sp<NativeHandle> getSidebandStream() const = 0;
    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
    // dump state into a string
    virtual void dump(String8& result, const char* prefix) const = 0;
    virtual void dump(String8& result, const char* prefix) const = 0;


Loading