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

Commit bcece608 authored by George Mount's avatar George Mount Committed by Android (Google) Code Review
Browse files

Merge "[VRR] Change maximum frame rate to 120 fps" into main

parents 71ba3bdf ed5651d2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5774,7 +5774,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     */
    private static final float FRAME_RATE_SIZE_PERCENTAGE_THRESHOLD = 0.07f;
    static final float MAX_FRAME_RATE = 140;
    static final float MAX_FRAME_RATE = 120;
    // The preferred frame rate of the view that is mainly used for
    // touch boosting, view velocity handling, and TextureView.
+2 −2
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ public class ViewFrameRateTest {
    @RequiresFlagsEnabled({FLAG_VIEW_VELOCITY_API,
            FLAG_TOOLKIT_FRAME_RATE_VELOCITY_MAPPING_READ_ONLY,
            FLAG_TOOLKIT_FRAME_RATE_VIEW_ENABLING_READ_ONLY})
    public void highVelocity140() throws Throwable {
    public void highVelocity120() throws Throwable {
        mActivityRule.runOnUiThread(() -> {
            ViewGroup.LayoutParams layoutParams = mMovingView.getLayoutParams();
            layoutParams.width = ViewGroup.LayoutParams.MATCH_PARENT;
@@ -208,7 +208,7 @@ public class ViewFrameRateTest {
            mMovingView.setFrameContentVelocity(1_000_000_000f);
            mMovingView.invalidate();
            runAfterDraw(() -> {
                assertEquals(140f, mViewRoot.getLastPreferredFrameRate(), 0f);
                assertEquals(120f, mViewRoot.getLastPreferredFrameRate(), 0f);
            });
        });
        waitForAfterDraw();