Skip to content

Commit 9221772

Browse files
hoxyqmeta-codesync[bot]
authored andcommitted
BeginDrawing: INTENDED_VSYNC_TIMESTAMP -> VSYNC_TIMESTAMP (#54765)
Summary: Pull Request resolved: #54765 # Changelog: [Internal] Looking at the Chrome DevTools Frontend code, the `BeginFrame` trace event represents the actual start of the frame sequence, not the expected one. Using inteded timestamp doesn't seem right here: - [INTENDED_VSYNC_TIMESTAMP](https://developer.android.com/reference/android/view/FrameMetrics#INTENDED_VSYNC_TIMESTAMP) - [VSYNC_TIMESTAMP](https://developer.android.com/reference/android/view/FrameMetrics#VSYNC_TIMESTAMP) INTENDED_VSYNC_TIMESTAMP description says: > The intended start point for the frame. If this value is different from VSYNC_TIMESTAMP, there was work occurring on the UI thread that prevented it from responding to the vsync signal in a timely fashion. Reviewed By: sbuggay Differential Revision: D88088882 fbshipit-source-id: 0980c4952b7b71dd8ea2333334f0ed89f6ecedb1
1 parent f3c9a8d commit 9221772

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/FrameTimingsObserver.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ internal class FrameTimingsObserver(
3636

3737
private val frameMetricsListener =
3838
Window.OnFrameMetricsAvailableListener { _, frameMetrics, _dropCount ->
39-
val beginDrawingTimestamp = frameMetrics.getMetric(FrameMetrics.INTENDED_VSYNC_TIMESTAMP)
39+
val beginDrawingTimestamp = frameMetrics.getMetric(FrameMetrics.VSYNC_TIMESTAMP)
4040
val commitTimestamp =
4141
beginDrawingTimestamp + frameMetrics.getMetric(FrameMetrics.INPUT_HANDLING_DURATION)
4242
+frameMetrics.getMetric(FrameMetrics.ANIMATION_DURATION)

0 commit comments

Comments
 (0)