Assign previous release fence to previous frame ID
...as otherwise the release timestamps for EGL/Vk timing apis are
shifted by one frame.
Bug: 295456126
Bug: 301055892
Bug: 303385401
Bug: 310927247
Test: Log and inspect timestamps
Change-Id: If1d8a525053591f15b95aeec8dc0bad8a13e6833
diff --git a/services/surfaceflinger/TransactionCallbackInvoker.cpp b/services/surfaceflinger/TransactionCallbackInvoker.cpp
index 3587a72..6a155c1 100644
--- a/services/surfaceflinger/TransactionCallbackInvoker.cpp
+++ b/services/surfaceflinger/TransactionCallbackInvoker.cpp
@@ -158,7 +158,7 @@
handle->previousReleaseFence = prevFence;
handle->previousReleaseFences.clear();
- FrameEventHistoryStats eventStats(handle->frameNumber,
+ FrameEventHistoryStats eventStats(handle->frameNumber, handle->previousFrameNumber,
handle->gpuCompositionDoneFence->getSnapshot().fence,
handle->compositorTiming, handle->refreshStartTime,
handle->dequeueReadyTime);