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

Commit c9ca7011 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

attempt to fix an ANR in various apps

recent changes in SF introduced a hang where some windows would
stop being refreshed.
This is an attemp to fix that.

Change-Id: I6aa32ac0d6f1c0a6aea8f6195825dc4f4e6f93f9
parent 1d7264e9
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -425,12 +425,12 @@ void SurfaceFlinger::onMessageReceived(int32_t what)
        } break;

        case MessageQueue::REFRESH: {
            if (!mDirtyRegion.isEmpty()) {
            // NOTE: it is mandatory to call hw.compositionComplete()
            // after handleRefresh()
            const DisplayHardware& hw(graphicPlane(0).displayHardware());
            handleRefresh();

                const DisplayHardware& hw(graphicPlane(0).displayHardware());
            if (!mDirtyRegion.isEmpty()) {
                if (CC_UNLIKELY(mHwWorkListDirty)) {
                    // build the h/w work list
                    handleWorkList();
@@ -445,6 +445,8 @@ void SurfaceFlinger::onMessageReceived(int32_t what)
                    // pretend we did the post
                    hw.compositionComplete();
                }
            } else {
                hw.compositionComplete();
            }
        } break;
    }