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

Commit f5ccb120 authored by Ady Abraham's avatar Ady Abraham Committed by Automerger Merge Worker
Browse files

Merge "SurfaceFlinger: tree vote for FrameRateCompatibility::ExactOrMultiple"...

Merge "SurfaceFlinger: tree vote for FrameRateCompatibility::ExactOrMultiple" into rvc-dev am: ff9926fc am: 55ff9cf9 am: 6b52c86e

Change-Id: Icb412c817a9262013d10391c02a0aeada2290013
parents c6903be2 6b52c86e
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1353,8 +1353,15 @@ void Layer::updateTreeHasFrameRateVote() {
    // First traverse the tree and count how many layers has votes
    int layersWithVote = 0;
    traverseTree([&layersWithVote](Layer* layer) {
        if (layer->mCurrentState.frameRate.rate > 0 ||
            layer->mCurrentState.frameRate.type == FrameRateCompatibility::NoVote) {
        const auto layerVotedWithDefaultCompatibility = layer->mCurrentState.frameRate.rate > 0 &&
                layer->mCurrentState.frameRate.type == FrameRateCompatibility::Default;
        const auto layerVotedWithNoVote =
                layer->mCurrentState.frameRate.type == FrameRateCompatibility::NoVote;

        // We do not count layers that are ExactOrMultiple for the same reason
        // we are allowing touch boost for those layers. See
        // RefreshRateConfigs::getBestRefreshRate for more details.
        if (layerVotedWithDefaultCompatibility || layerVotedWithNoVote) {
            layersWithVote++;
        }
    });