SurfaceFlinger: get expectedPresentTime from Scheduler
DispSync is owned by Scheduler when it is enabled.
This is a fix to get expectedPresentTime from Scheduler instead of
directly from DispSync.
Test: scroll within app and check systrace
Change-Id: I103d2a56767c49fc5d0c472c6307f3d84e353ac9
diff --git a/services/surfaceflinger/Scheduler/Scheduler.cpp b/services/surfaceflinger/Scheduler/Scheduler.cpp
index cb83c62..5268c8c 100644
--- a/services/surfaceflinger/Scheduler/Scheduler.cpp
+++ b/services/surfaceflinger/Scheduler/Scheduler.cpp
@@ -238,6 +238,10 @@
mHWVsyncAvailable = makeAvailable;
}
+nsecs_t Scheduler::expectedPresentTime() {
+ return mPrimaryDispSync->expectedPresentTime();
+}
+
void Scheduler::addFramePresentTimeForLayer(const nsecs_t framePresentTime, bool isAutoTimestamp,
const std::string layerName) {
// This is V1 logic. It calculates the average FPS based on the timestamp frequency