From 7d436ecfc55ebf0ff69caa8d05a8f4eb63fb72f4 Mon Sep 17 00:00:00 2001 From: Alec Mouri Date: Wed, 27 Jan 2021 20:40:50 -0800 Subject: Plumb refresh and render rates into shared timeline * Make the overridden frame rate from the Scheduler public so that SurfaceFlinger can access it for each uid. * Add the display refresh rate on each display frame * Add the application rendering rate on each SurfaceFrame created * If there is no application rendering rate, then set it to the display refresh rate. * Plumb all those metrics into TimeStats. * Change global metrics to increment for every SurfaceFrame instead of every DisplayFrame, so that the rendering rate dimension can be accurately captured. Bug: 172937287 Test: builds, boots, timestats dump Change-Id: Icfd4cecfdfa5d6c434661cab91c624eb08e8baea --- services/surfaceflinger/SurfaceFlinger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services/surfaceflinger/SurfaceFlinger.cpp') diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index f785cae6cb..4f274b6865 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1899,7 +1899,7 @@ void SurfaceFlinger::onMessageInvalidate(int64_t vsyncId, nsecs_t expectedVSyncT const bool tracePreComposition = mTracingEnabled && !mTracePostComposition; ConditionalLockGuard lock(mTracingLock, tracePreComposition); - mFrameTimeline->setSfWakeUp(vsyncId, frameStart, stats.vsyncPeriod); + mFrameTimeline->setSfWakeUp(vsyncId, frameStart, Fps::fromPeriodNsecs(stats.vsyncPeriod)); refreshNeeded = handleMessageTransaction(); refreshNeeded |= handleMessageInvalidate(); -- cgit v1.2.3-59-g8ed1b