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

Commit 6a5dc1fa authored by Robert Carr's avatar Robert Carr
Browse files

BufferStateLayer: shouldPresentNow is always true

This method should actually be removed because we do the checking
at the transaction queue level now, but we leave it for now for
BufferQueueLayer. To show the method should always return true
we can examine each clause in the method:
	1. isVsyncValidForUid: We were supposed to check this at
	transaction queue, if for some reason this returned false
	now we just need to continue.
	2. getSideBandStream/AutoRefresh, covered by the call to
	layer->hasReadyFrame which encloses the only call to
	layer->shouldPresentNow
	3. hasFrameUpdate, also called by layer->hasReadyFrame
	4. isBufferDue, supposed to be handled by the transaction
	queue, mismatch not allowed at this point.
Just landing this to simplify debugging around this codepath.

Bug: 180194022
Test: Existing tests pass
Change-Id: I1a5eb572a3e651a2504039ef9cc8e3b51a46dd3c
parent a170ec6a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -182,7 +182,7 @@ protected:
    bool getSidebandStreamChanged() const { return mSidebandStreamChanged; }
    bool getSidebandStreamChanged() const { return mSidebandStreamChanged; }


    // Returns true if the next buffer should be presented at the expected present time
    // Returns true if the next buffer should be presented at the expected present time
    bool shouldPresentNow(nsecs_t expectedPresentTime) const final;
    bool shouldPresentNow(nsecs_t expectedPresentTime) const;


    // Returns true if the next buffer should be presented at the expected present time,
    // Returns true if the next buffer should be presented at the expected present time,
    // overridden by BufferStateLayer and BufferQueueLayer for implementation
    // overridden by BufferStateLayer and BufferQueueLayer for implementation
+2 −0
Original line number Original line Diff line number Diff line
@@ -118,6 +118,8 @@ public:
    std::atomic<int32_t>* getPendingBufferCounter() override { return &mPendingBufferTransactions; }
    std::atomic<int32_t>* getPendingBufferCounter() override { return &mPendingBufferTransactions; }
    std::string getPendingBufferCounterName() override { return mBlastTransactionName; }
    std::string getPendingBufferCounterName() override { return mBlastTransactionName; }


    bool shouldPresentNow(nsecs_t /*expectedPresentTime*/) const override { return true; }

protected:
protected:
    void gatherBufferInfo() override;
    void gatherBufferInfo() override;
    uint64_t getHeadFrameNumber(nsecs_t expectedPresentTime) const;
    uint64_t getHeadFrameNumber(nsecs_t expectedPresentTime) const;