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

Commit e365c994 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "HWC2: Backpressure on transactions as well" into nyc-mr1-dev

parents 6118fb85 5018288a
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -913,6 +913,15 @@ void SurfaceFlinger::onMessageReceived(int32_t what) {
    ATRACE_CALL();
    switch (what) {
        case MessageQueue::INVALIDATE: {
            bool frameMissed = !mHadClientComposition &&
                    mPreviousPresentFence != Fence::NO_FENCE &&
                    mPreviousPresentFence->getSignalTime() == INT64_MAX;
            ATRACE_INT("FrameMissed", static_cast<int>(frameMissed));
            if (frameMissed) {
                signalLayerUpdate();
                break;
            }

            bool refreshNeeded = handleMessageTransaction();
            refreshNeeded |= handleMessageInvalidate();
            refreshNeeded |= mRepaintEverything;
@@ -942,14 +951,6 @@ bool SurfaceFlinger::handleMessageTransaction() {

bool SurfaceFlinger::handleMessageInvalidate() {
    ATRACE_CALL();
    bool frameMissed = !mHadClientComposition &&
            mPreviousPresentFence != Fence::NO_FENCE &&
            mPreviousPresentFence->getSignalTime() == INT64_MAX;
    ATRACE_INT("FrameMissed", static_cast<int>(frameMissed));
    if (frameMissed) {
        signalLayerUpdate();
        return false;
    }
    return handlePageFlip();
}