summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/RegionSamplingThread.cpp
diff options
context:
space:
mode:
author Ady Abraham <adyabr@google.com> 2020-12-29 12:08:45 -0800
committer Ady Abraham <adyabr@google.com> 2020-12-29 20:11:20 +0000
commite90dd52de547df1fcef4b928b356a49c60d3b64d (patch)
treefaf591b74f0486c082d1ad8d57242e3d6990df14 /services/surfaceflinger/RegionSamplingThread.cpp
parent64c2fc0ebec9fd0913b7262fc0927366c980740a (diff)
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
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.cpp')
-rw-r--r--services/surfaceflinger/RegionSamplingThread.cpp3
1 files changed, 1 insertions, 2 deletions
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<int>(samplingStep::waitForQuietFrame));
mDiscardedFrames++;