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

Commit 7d1e9ceb authored by Ady Abraham's avatar Ady Abraham
Browse files

SF: don't mark frame activity for NO_PREF category

Bug: 339788845
Test: android.platform.test.scenario.sysui.quicksettings.QSHeaderAfterRotationTestMicrobenchmark#afterRotation_iconsVisible
Change-Id: I85696c0c4316d4e2fd6f31348d7c73c3ae771b97
parent df59f474
Loading
Loading
Loading
Loading
+17 −3
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include "FrontEnd/LayerCreationArgs.h"
#include "renderengine/ExternalTexture.h"

#include <common/FlagManager.h>
#include <gui/LayerState.h>
#include <system/window.h>

@@ -108,11 +109,24 @@ struct TransactionState {

        for (const auto& state : states) {
            const bool frameRateChanged = state.state.what & layer_state_t::eFrameRateChanged;
            if (FlagManager::getInstance().vrr_bugfix_24q4()) {
                const bool frameRateIsNoVote = frameRateChanged &&
                        state.state.frameRateCompatibility == ANATIVEWINDOW_FRAME_RATE_NO_VOTE;
                const bool frameRateCategoryChanged =
                        state.state.what & layer_state_t::eFrameRateCategoryChanged;
                const bool frameRateCategoryIsNoPreference = frameRateCategoryChanged &&
                        state.state.frameRateCategory ==
                                ANATIVEWINDOW_FRAME_RATE_CATEGORY_NO_PREFERENCE;
                if (!frameRateIsNoVote && !frameRateCategoryIsNoPreference) {
                    return true;
                }
            } else {
                if (!frameRateChanged ||
                    state.state.frameRateCompatibility != ANATIVEWINDOW_FRAME_RATE_NO_VOTE) {
                    return true;
                }
            }
        }

        return false;
    }