summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/RegionSamplingThread.cpp
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2024-06-29 01:17:02 +0000
committer Vishnu Nair <vishnun@google.com> 2024-06-29 01:19:15 +0000
commit5aadd249f326b21e5ef6cadfebc15b6a0a016816 (patch)
tree1c43ae833d2a646e636ac079705f9389b07e90be /services/surfaceflinger/RegionSamplingThread.cpp
parent20f86107d6bab7cc810700550b779bf5734b332f (diff)
Enable single hop screenshots for only threaded re
Fixes a deadlock where screenshot requests are blocked on the main thread which inturn is blocked by the screenshot request finishing. Flag: EXEMPT bug fix Bug: 349776684 Test: presubmit Change-Id: Ibf038ad6db3e87c84508d3e101ca1eb144836d7c
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.cpp')
-rw-r--r--services/surfaceflinger/RegionSamplingThread.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/RegionSamplingThread.cpp b/services/surfaceflinger/RegionSamplingThread.cpp
index 1eb865d600..cd3c638d7c 100644
--- a/services/surfaceflinger/RegionSamplingThread.cpp
+++ b/services/surfaceflinger/RegionSamplingThread.cpp
@@ -354,7 +354,7 @@ void RegionSamplingThread::captureSample() {
FenceResult fenceResult;
if (FlagManager::getInstance().single_hop_screenshot() &&
- FlagManager::getInstance().ce_fence_promise()) {
+ FlagManager::getInstance().ce_fence_promise() && mFlinger.mRenderEngine->isThreaded()) {
std::vector<sp<LayerFE>> layerFEs;
auto displayState = mFlinger.getSnapshotsFromMainThread(renderAreaBuilder,
getLayerSnapshotsFn, layerFEs);