Skip to content

Commit a3af4c9

Browse files
Dave BurkeAndroid Git Automerger
authored andcommitted
am 3ee4718: Frame rate to 48 fps
* commit '3ee471889b09d90affddd00c409a515a64b6861b': Frame rate to 48 fps
2 parents 515c6b4 + 3ee4718 commit a3af4c9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ public class WindowManagerService extends IWindowManager.Stub
226226
*/
227227
static final int DEFAULT_FADE_IN_OUT_DURATION = 400;
228228

229+
/**
230+
* Frame rate. TODO: Replace with Display.getRefreshRate() when that is reliable.
231+
*/
232+
static final int FRAME_RATE = 48;
233+
229234
/**
230235
* If true, the window manager will do its own custom freezing and general
231236
* management of the screen during rotation.
@@ -8682,7 +8687,7 @@ private final void performLayoutAndPlaceSurfacesLockedInner(
86828687
if (needRelayout) {
86838688
requestAnimationLocked(0);
86848689
} else if (animating) {
8685-
requestAnimationLocked(currentTime+(1000/60)-SystemClock.uptimeMillis());
8690+
requestAnimationLocked(currentTime+(1000/FRAME_RATE)-SystemClock.uptimeMillis());
86868691
}
86878692

86888693
// Finally update all input windows now that the window changes have stabilized.

0 commit comments

Comments
 (0)