-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#29800Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-androidAndroid applications specificallyAndroid applications specificallywaiting for PR to land (fixed)A fix is in flightA fix is in flight
Description
Today, the Android embedding calls Display#getRefreshRate once at initialization to get the refresh rate, and then assumes that stays stable when talking to the VSync waiter.
This is actually incorrect, since modern devices can dynamically change refresh rates. However, repeatedly calling getRefreshRate can be slow on some phones (2.5-5ms measured on a Huawei Nova 3), and calling it every frame is expensive.
We should use the AChoreographer_registerRefreshRateCallback where it's available to more efficiently get the FPS rate. This will unblock using the vsync target time for flutter/engine#29727
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-androidAndroid applications specificallyAndroid applications specificallywaiting for PR to land (fixed)A fix is in flightA fix is in flight