Use start time in SurfaceControl setFrameTimeline.

Users of the API will see in the "Actual Timeline" the actual start time
rather than expected start time.

Bug: 210043506
Test: perfetto log of with & w/o CL, using Chromium apk, bug 198192946
Change-Id: I013bf6e28de32c82c9d645cc4cacf0cc01e0dd9f
diff --git a/native/android/surface_control.cpp b/native/android/surface_control.cpp
index 6eff629..1ebdc27 100644
--- a/native/android/surface_control.cpp
+++ b/native/android/surface_control.cpp
@@ -17,18 +17,15 @@
 #include <android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h>
 #include <android/native_window.h>
 #include <android/surface_control.h>
-#include <surface_control_private.h>
-
 #include <configstore/Utils.h>
-
 #include <gui/HdrMetadata.h>
 #include <gui/ISurfaceComposer.h>
 #include <gui/Surface.h>
 #include <gui/SurfaceComposerClient.h>
 #include <gui/SurfaceControl.h>
-
+#include <private/android/choreographer.h>
+#include <surface_control_private.h>
 #include <ui/DynamicDisplayInfo.h>
-
 #include <utils/Timers.h>
 
 using namespace android::hardware::configstore;
@@ -671,7 +668,7 @@
 void ASurfaceTransaction_setFrameTimeline(ASurfaceTransaction* aSurfaceTransaction,
                                           AVsyncId vsyncId) {
     CHECK_NOT_NULL(aSurfaceTransaction);
-    // TODO(b/210043506): Get start time from platform.
+    const auto startTime = AChoreographer_getStartTimeNanosForVsyncId(vsyncId);
     ASurfaceTransaction_to_Transaction(aSurfaceTransaction)
-            ->setFrameTimelineInfo({.vsyncId = vsyncId, .startTimeNanos = 0});
+            ->setFrameTimelineInfo({.vsyncId = vsyncId, .startTimeNanos = startTime});
 }