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

Commit 25353472 authored by Jian-Syuan (Shane) Wong's avatar Jian-Syuan (Shane) Wong Committed by Android (Google) Code Review
Browse files

Merge "Apply FRAME_RATE_SELECTION_STRATEGY_SELF frame selection strategy" into main

parents 044b72b4 7ccc93a7
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -2449,6 +2449,19 @@ public final class ViewRootImpl implements ViewParent,
        if (updateBoundsLayer(t)) {
            applyTransactionOnDraw(t);
        }

        // Set the frame rate selection strategy to FRAME_RATE_SELECTION_STRATEGY_SELF
        // This strategy ensures that the frame rate specifications do not cascade down to
        // the descendant layers. This is particularly important for applications like Chrome,
        // where child surfaces should adhere to default behavior instead of no preference
        if (sToolkitSetFrameRateReadOnlyFlagValue) {
            try {
                mFrameRateTransaction.setFrameRateSelectionStrategy(sc,
                        sc.FRAME_RATE_SELECTION_STRATEGY_SELF).applyAsyncUnsafe();
            } catch (Exception e) {
                Log.e(mTag, "Unable to set frame rate selection strategy ", e);
            }
        }
    }

    private void destroySurface() {