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

Commit e247a645 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am fe005282: fix UI freezes

* commit 'fe005282dbf901e54ace8c7fe452aa4f31a93a0a':
  fix UI freezes
parents ce57e2fa b048cef2
Loading
Loading
Loading
Loading
+18 −21
Original line number Diff line number Diff line
@@ -419,9 +419,7 @@ void SurfaceFlinger::onMessageReceived(int32_t what)
            // post surfaces (if needed)
            handlePageFlip();

            if (!mDirtyRegion.isEmpty()) {
            signalRefresh();
            }
        } break;

        case MessageQueue::REFRESH: {
@@ -430,7 +428,6 @@ void SurfaceFlinger::onMessageReceived(int32_t what)
            const DisplayHardware& hw(graphicPlane(0).displayHardware());
            handleRefresh();

            if (!mDirtyRegion.isEmpty()) {
            if (CC_UNLIKELY(mHwWorkListDirty)) {
                // build the h/w work list
                handleWorkList();
@@ -445,18 +442,18 @@ void SurfaceFlinger::onMessageReceived(int32_t what)
                // pretend we did the post
                hw.compositionComplete();
            }
            } else {
                hw.compositionComplete();
            }

        } break;
    }
}

void SurfaceFlinger::postFramebuffer()
{
    // this should never happen. we do the flip anyways so we don't
    // risk to cause a deadlock with hwc
    ALOGW_IF(mSwapRegion.isEmpty(), "mSwapRegion is empty");
    // mSwapRegion can be empty here is some cases, for instance if a hidden
    // or fully transparent window is updating.
    // in that case, we need to flip anyways to not risk a deadlock with
    // h/w composer.

    const DisplayHardware& hw(graphicPlane(0).displayHardware());
    const nsecs_t now = systemTime();
    mDebugInSwapBuffers = now;