Rename "leader" display to "pacesetter"
"Leader" became ambiguous once we began to consider that there are two
orthogonal concepts that "leader" seems to imply:
- The display with the highest refresh rate (originally called "leader")
- The display that is refreshed first in a given update (assuming it's
being updated)
To better distinguish between the two, we've come up with new names:
- pacesetter
- front runner (for the second concept)
Change uses of "leader" to "pacesetter" throughout SF and Scheduler.
Bug: 255635821
Bug: 256196556
Test: m
Change-Id: Ia02c35dd442d310695f1ce873fbaf30910c12419
diff --git a/services/surfaceflinger/tests/unittests/TestableScheduler.h b/services/surfaceflinger/tests/unittests/TestableScheduler.h
index ac04720..d4b4434 100644
--- a/services/surfaceflinger/tests/unittests/TestableScheduler.h
+++ b/services/surfaceflinger/tests/unittests/TestableScheduler.h
@@ -63,7 +63,7 @@
return Scheduler::createConnection(std::move(eventThread));
}
- auto refreshRateSelector() { return leaderSelectorPtr(); }
+ auto refreshRateSelector() { return pacesetterSelectorPtr(); }
const auto& refreshRateSelectors() const NO_THREAD_SAFETY_ANALYSIS {
return mRefreshRateSelectors;
@@ -92,13 +92,13 @@
Scheduler::unregisterDisplay(displayId);
}
- std::optional<PhysicalDisplayId> leaderDisplayId() const NO_THREAD_SAFETY_ANALYSIS {
- return mLeaderDisplayId;
+ std::optional<PhysicalDisplayId> pacesetterDisplayId() const NO_THREAD_SAFETY_ANALYSIS {
+ return mPacesetterDisplayId;
}
- void setLeaderDisplay(PhysicalDisplayId displayId) {
+ void setPacesetterDisplay(PhysicalDisplayId displayId) {
ftl::FakeGuard guard(kMainThreadContext);
- Scheduler::setLeaderDisplay(displayId);
+ Scheduler::setPacesetterDisplay(displayId);
}
auto& mutableAppConnectionHandle() { return mAppConnectionHandle; }