From b43b58378679bf4ac8d0837047187d4509bc45d8 Mon Sep 17 00:00:00 2001 From: Melody Hsu Date: Fri, 23 Feb 2024 02:37:38 +0000 Subject: Refactor of screenshot code on main thread. Create helper functions to improve readability of what is scheduled on the SurfaceFlinger main thread. This will allow for cleaner changes in reducing the calls on the main thread for screenshots. Changes include some renaming for better clarity. Bug: b/294936197 Test: presubmit Test: atest SurfaceFlinger_test Change-Id: I729b62b3fc1919b5b048b7992b4aead336e87d7f --- services/surfaceflinger/RegionSamplingThread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'services/surfaceflinger/RegionSamplingThread.cpp') diff --git a/services/surfaceflinger/RegionSamplingThread.cpp b/services/surfaceflinger/RegionSamplingThread.cpp index c888ccc8ae..77e045d6f9 100644 --- a/services/surfaceflinger/RegionSamplingThread.cpp +++ b/services/surfaceflinger/RegionSamplingThread.cpp @@ -377,8 +377,8 @@ void RegionSamplingThread::captureSample() { constexpr bool kIsProtected = false; if (const auto fenceResult = - mFlinger.captureScreenCommon(std::move(renderAreaFuture), getLayerSnapshots, buffer, - kRegionSampling, kGrayscale, kIsProtected, nullptr) + mFlinger.captureScreenshot(std::move(renderAreaFuture), getLayerSnapshots, buffer, + kRegionSampling, kGrayscale, kIsProtected, nullptr) .get(); fenceResult.ok()) { fenceResult.value()->waitForever(LOG_TAG); -- cgit v1.2.3-59-g8ed1b