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

Commit c04b9206 authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge changes I0b1cb7ac,I1a5eb572 into sc-dev

* changes:
  SurfaceFlinger: Check both queues in transactionFlushNeeded
  BufferStateLayer: shouldPresentNow is always true
parents f73e801e 79bf8a9d
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
@@ -116,6 +116,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;
+1 −1
Original line number Original line Diff line number Diff line
@@ -3369,7 +3369,7 @@ void SurfaceFlinger::flushTransactionQueues() {


bool SurfaceFlinger::transactionFlushNeeded() {
bool SurfaceFlinger::transactionFlushNeeded() {
    Mutex::Autolock _l(mQueueLock);
    Mutex::Autolock _l(mQueueLock);
    return !mPendingTransactionQueues.empty();
    return !mPendingTransactionQueues.empty() || !mTransactionQueue.empty();
}
}


bool SurfaceFlinger::transactionIsReadyToBeApplied(
bool SurfaceFlinger::transactionIsReadyToBeApplied(