From e90dd52de547df1fcef4b928b356a49c60d3b64d Mon Sep 17 00:00:00 2001 From: Ady Abraham Date: Tue, 29 Dec 2020 12:08:45 -0800 Subject: SurfaceFlinger: return DisplayStatInfo from getDisplayStatInfo Code cleanup - return the class instead of passing it as an output parameter. Test: SF unit tests Change-Id: I7a995415a81f3944d93a1cb573c8e3108464bd07 --- services/surfaceflinger/RegionSamplingThread.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'services/surfaceflinger/RegionSamplingThread.cpp') diff --git a/services/surfaceflinger/RegionSamplingThread.cpp b/services/surfaceflinger/RegionSamplingThread.cpp index ad4877bdeb..2aea8b4c74 100644 --- a/services/surfaceflinger/RegionSamplingThread.cpp +++ b/services/surfaceflinger/RegionSamplingThread.cpp @@ -250,8 +250,7 @@ void RegionSamplingThread::doSample() { // If there is relatively little time left for surfaceflinger // until the next vsync deadline, defer this sampling work // to a later frame, when hopefully there will be more time. - DisplayStatInfo stats; - mScheduler.getDisplayStatInfo(&stats, systemTime()); + const DisplayStatInfo stats = mScheduler.getDisplayStatInfo(systemTime()); if (std::chrono::nanoseconds(stats.vsyncTime) - now < timeForRegionSampling) { ATRACE_INT(lumaSamplingStepTag, static_cast(samplingStep::waitForQuietFrame)); mDiscardedFrames++; -- cgit v1.2.3-59-g8ed1b