SF: Move ownership of VsyncModulator to Scheduler
...as a prerequisite for calculating the VSYNC deadline of the leader
display (and deriving per-display state from it, e.g. present fences,
traces) in the Scheduler.
Bug: 241285475
Bug: 241285191
Test: Boot
Change-Id: Ieea136616435464dd0756525f94441b8e82ad06a
diff --git a/services/surfaceflinger/tests/unittests/TransactionApplicationTest.cpp b/services/surfaceflinger/tests/unittests/TransactionApplicationTest.cpp
index a28d1cd..859f702 100644
--- a/services/surfaceflinger/tests/unittests/TransactionApplicationTest.cpp
+++ b/services/surfaceflinger/tests/unittests/TransactionApplicationTest.cpp
@@ -228,6 +228,11 @@
EXPECT_EQ(0u, transactionQueue.size());
}
+ void modulateVsync() {
+ static_cast<void>(
+ mFlinger.mutableScheduler().mutableVsyncModulator().onRefreshRateChangeInitiated());
+ }
+
bool mHasListenerCallbacks = false;
std::vector<ListenerCallbacks> mCallbacks;
int mTransactionNumber = 0;
@@ -623,9 +628,7 @@
layer_state_t::eBufferChanged),
});
- // Get VsyncModulator out of the default config
- static_cast<void>(mFlinger.mutableVsyncModulator()->onRefreshRateChangeInitiated());
-
+ modulateVsync();
setTransactionStates({unsignaledTransaction}, kExpectedTransactionsPending);
}
@@ -985,9 +988,7 @@
layer_state_t::eBufferChanged),
});
- // Get VsyncModulator out of the default config
- static_cast<void>(mFlinger.mutableVsyncModulator()->onRefreshRateChangeInitiated());
-
+ modulateVsync();
setTransactionStates({unsignaledTransaction}, kExpectedTransactionsPending);
}