summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2023-12-13 23:26:18 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-12-13 23:26:18 +0000
commit330be7fa00c5e79563f3831fbb8b15fac076429e (patch)
treef01149ce670a348e76b2136f13b9e525dd4c3d07 /services
parent9285f28eed4e08b1ff60e76a41a8122cc380cbfe (diff)
parent08d7c813f8944d967e6ca32a3f1ab5d2643ac252 (diff)
downloadnative-330be7fa00c5e79563f3831fbb8b15fac076429e.tar.gz
Merge "surfaceflinger: Fix -Wunused-variable compiler warning" into main
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/Scheduler/Scheduler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/Scheduler/Scheduler.cpp b/services/surfaceflinger/Scheduler/Scheduler.cpp
index 68927bd806..54ff2cdf87 100644
--- a/services/surfaceflinger/Scheduler/Scheduler.cpp
+++ b/services/surfaceflinger/Scheduler/Scheduler.cpp
@@ -577,7 +577,8 @@ void Scheduler::addPresentFence(PhysicalDisplayId id, std::shared_ptr<FenceTime>
if (!scheduleOpt) return;
const auto& schedule = scheduleOpt->get();
- if (const bool needMoreSignals = schedule->getController().addPresentFence(std::move(fence))) {
+ const bool needMoreSignals = schedule->getController().addPresentFence(std::move(fence));
+ if (needMoreSignals) {
schedule->enableHardwareVsync();
} else {
constexpr bool kDisallow = false;