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

Commit 381752d1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Lower FSP on window animation too"

parents ee219795 b708cbe2
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -235,6 +235,8 @@ public final class Choreographer {
        for (int i = 0; i <= CALLBACK_LAST; i++) {
        for (int i = 0; i <= CALLBACK_LAST; i++) {
            mCallbackQueues[i] = new CallbackQueue();
            mCallbackQueues[i] = new CallbackQueue();
        }
        }
        // b/68769804: For low FPS experiments.
        setFPSDivisor(SystemProperties.getInt(ThreadedRenderer.DEBUG_FPS_DIVISOR, 1));
    }
    }


    private static float getRefreshRate() {
    private static float getRefreshRate() {
@@ -605,6 +607,7 @@ public final class Choreographer {
    void setFPSDivisor(int divisor) {
    void setFPSDivisor(int divisor) {
        if (divisor <= 0) divisor = 1;
        if (divisor <= 0) divisor = 1;
        mFPSDivisor = divisor;
        mFPSDivisor = divisor;
        ThreadedRenderer.setFPSDivisor(divisor);
    }
    }


    void doFrame(long frameTimeNanos, int frame) {
    void doFrame(long frameTimeNanos, int frame) {
+1 −5
Original line number Original line Diff line number Diff line
@@ -969,8 +969,6 @@ public final class ThreadedRenderer {
            mInitialized = true;
            mInitialized = true;
            mAppContext = context.getApplicationContext();
            mAppContext = context.getApplicationContext();


            // b/68769804: For low FPS experiments.
            setFPSDivisor(SystemProperties.getInt(DEBUG_FPS_DIVISOR, 1));
            initSched(renderProxy);
            initSched(renderProxy);
            initGraphicsStats();
            initGraphicsStats();
        }
        }
@@ -1025,9 +1023,7 @@ public final class ThreadedRenderer {


    /** b/68769804: For low FPS experiments. */
    /** b/68769804: For low FPS experiments. */
    public static void setFPSDivisor(int divisor) {
    public static void setFPSDivisor(int divisor) {
        if (divisor <= 0) divisor = 1;
        nHackySetRTAnimationsEnabled(divisor <= 1);
        Choreographer.getInstance().setFPSDivisor(divisor);
        nHackySetRTAnimationsEnabled(divisor == 1);
    }
    }


    /** Not actually public - internal use only. This doc to make lint happy */
    /** Not actually public - internal use only. This doc to make lint happy */