SF: Delegate ICompositor interfacing to Scheduler
Factor out MessageQueue's calls to commit/composite/sample into an
onFrameSignal delegate that Scheduler implements, since the policy
for ICompositor interfacing (e.g. whether to composite displays
sequentially or concurrently) will be the latter's responsibility.
Improve type correctness by replacing more nsecs_t with TimePoint/
Duration, and int64_t with a new VsyncId type.
Bug: 241285191
Test: Boot
Change-Id: I5039894038b62a562c1f93b7cea41751f7f76ca6
diff --git a/services/surfaceflinger/Scheduler/Scheduler.h b/services/surfaceflinger/Scheduler/Scheduler.h
index f800eeb..4730493 100644
--- a/services/surfaceflinger/Scheduler/Scheduler.h
+++ b/services/surfaceflinger/Scheduler/Scheduler.h
@@ -192,7 +192,7 @@
// Returns true if a given vsync timestamp is considered valid vsync
// for a given uid
- bool isVsyncValid(nsecs_t expectedVsyncTimestamp, uid_t uid) const;
+ bool isVsyncValid(TimePoint expectedVsyncTimestamp, uid_t uid) const;
void dump(std::string&) const;
void dump(ConnectionHandle, std::string&) const;
@@ -243,6 +243,9 @@
enum class TimerState { Reset, Expired };
enum class TouchState { Inactive, Active };
+ // impl::MessageQueue overrides:
+ void onFrameSignal(ICompositor&, VsyncId, TimePoint expectedVsyncTime) override;
+
// Create a connection on the given EventThread.
ConnectionHandle createConnection(std::unique_ptr<EventThread>);
sp<EventThreadConnection> createConnectionInternal(