Skip to content

Commit 76ac787

Browse files
hoxyqfacebook-github-bot
authored andcommitted
BeginDrawing: INTENDED_VSYNC_TIMESTAMP -> VSYNC_TIMESTAMP
Summary: # 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. Differential Revision: D88088882
1 parent 41eace0 commit 76ac787

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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
@@ -25,7 +25,7 @@ internal class FrameTimingsObserver(
2525

2626
private val frameMetricsListener =
2727
Window.OnFrameMetricsAvailableListener { _, frameMetrics, _dropCount ->
28-
val beginDrawingTimestamp = frameMetrics.getMetric(FrameMetrics.INTENDED_VSYNC_TIMESTAMP)
28+
val beginDrawingTimestamp = frameMetrics.getMetric(FrameMetrics.VSYNC_TIMESTAMP)
2929
val commitTimestamp =
3030
beginDrawingTimestamp + frameMetrics.getMetric(FrameMetrics.INPUT_HANDLING_DURATION)
3131
+frameMetrics.getMetric(FrameMetrics.ANIMATION_DURATION)

0 commit comments

Comments
 (0)