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

Commit 1728a550 authored by Midas Chien's avatar Midas Chien Committed by Android (Google) Code Review
Browse files

Merge "SurfaceFlinger: Modify the meaning of composition strategy changes"

parents 6d68b18f 50f52e2b
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1982,7 +1982,7 @@ void SurfaceFlinger::onMessageRefresh() {
    mFrameTimeline->setSfPresent(systemTime(),
                                 std::make_shared<FenceTime>(mPreviousPresentFences[0]));

    const bool prevFrameHadDeviceComposition = mHadDeviceComposition;
    const bool prevFrameHadClientComposition = mHadClientComposition;

    mHadClientComposition = std::any_of(displays.cbegin(), displays.cend(), [](const auto& pair) {
        const auto& state = pair.second->getCompositionDisplay()->getState();
@@ -1997,9 +1997,8 @@ void SurfaceFlinger::onMessageRefresh() {
                const auto& state = pair.second->getCompositionDisplay()->getState();
                return state.reusedClientComposition;
            });

    // Only report a strategy change if we move in and out of composition with hw overlays
    if (prevFrameHadDeviceComposition != mHadDeviceComposition) {
    // Only report a strategy change if we move in and out of client composition
    if (prevFrameHadClientComposition != mHadClientComposition) {
        mTimeStats->incrementCompositionStrategyChanges();
    }