Use VsyncEventData in DisplayEventReceiver::Event.
Clean-up that re-uses VsyncEventData so it's easier to maintain.
The ParcelableVsyncEventData is used in AIDL. It is separated from
VsyncEventData because of the union in
DisplayEventReceiver::Event and Parcelable has non-trivial
constructors.
Bug: 218563993
Test: atest ChoreographerNativeTest
Test: atest libsurfaceflinger_unittest
Test: atest libgui_test
Change-Id: I3ebeb1c7826300c27c4a12d4dba6fbd16305e9e1
diff --git a/services/surfaceflinger/Scheduler/MessageQueue.cpp b/services/surfaceflinger/Scheduler/MessageQueue.cpp
index a020e2c..712cd5b 100644
--- a/services/surfaceflinger/Scheduler/MessageQueue.cpp
+++ b/services/surfaceflinger/Scheduler/MessageQueue.cpp
@@ -191,7 +191,8 @@
for (int i = 0; i < n; i++) {
if (buffer[i].header.type == DisplayEventReceiver::DISPLAY_EVENT_VSYNC) {
auto& vsync = buffer[i].vsync;
- mHandler->dispatchFrame(vsync.vsyncId, vsync.expectedVSyncTimestamp);
+ mHandler->dispatchFrame(vsync.vsyncData.preferredVsyncId(),
+ vsync.vsyncData.preferredExpectedPresentationTime());
break;
}
}