SF: use TextureView hint when selecting the refresh rate
SF would only try to heuristically calculate the frame rate of a layer
when TextureView is updating. This fixes a bug where SF tries to
heuristically calculate the frame rate for UI animations but fails
due to long frames.
Bug: 280249265
Test: Playing a video on Facebook and observe refresh rate
Test: go/cb-pcmark
Change-Id: Ic98484b8313f1e8e6ad01297b63bb64da6d4a6dd
diff --git a/libs/nativewindow/include/system/window.h b/libs/nativewindow/include/system/window.h
index 6c54635..0fee3c1 100644
--- a/libs/nativewindow/include/system/window.h
+++ b/libs/nativewindow/include/system/window.h
@@ -1066,13 +1066,12 @@
(int)compatibility, (int)changeFrameRateStrategy);
}
-static inline int native_window_set_frame_timeline_info(struct ANativeWindow* window,
- uint64_t frameNumber,
- int64_t frameTimelineVsyncId,
- int32_t inputEventId,
- int64_t startTimeNanos) {
+static inline int native_window_set_frame_timeline_info(
+ struct ANativeWindow* window, uint64_t frameNumber, int64_t frameTimelineVsyncId,
+ int32_t inputEventId, int64_t startTimeNanos, int32_t useForRefreshRateSelection) {
return window->perform(window, NATIVE_WINDOW_SET_FRAME_TIMELINE_INFO, frameNumber,
- frameTimelineVsyncId, inputEventId, startTimeNanos);
+ frameTimelineVsyncId, inputEventId, startTimeNanos,
+ useForRefreshRateSelection);
}
// ------------------------------------------------------------------------------------------------