diff options
author | Scott Lobdell <slobdell@google.com> | 2021-04-25 19:53:06 +0000 |
---|---|---|
committer | Rob Seymour <rseymour@google.com> | 2021-05-06 22:32:25 +0000 |
commit | afbe732519a96ff0a42a1c98bd59fd04080b4a96 (patch) | |
tree | 9ca836d438ca47756e4761ee4b844b85bd7e8857 /services/surfaceflinger/tests/unittests/EventThreadTest.cpp | |
parent | 7a303d6e8135bbd0a32075986c9f7083e0fbef23 (diff) | |
parent | 7132116dfd8bdb9c5b505db8d8a27526a4e889d8 (diff) |
Merge SP1A.210425.001
Change-Id: I219cc0af128876534b77a72c36979fa1fe08ba13
Diffstat (limited to 'services/surfaceflinger/tests/unittests/EventThreadTest.cpp')
-rw-r--r-- | services/surfaceflinger/tests/unittests/EventThreadTest.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/services/surfaceflinger/tests/unittests/EventThreadTest.cpp b/services/surfaceflinger/tests/unittests/EventThreadTest.cpp index 7cc0032bc8..b4a1481e9c 100644 --- a/services/surfaceflinger/tests/unittests/EventThreadTest.cpp +++ b/services/surfaceflinger/tests/unittests/EventThreadTest.cpp @@ -44,7 +44,7 @@ namespace { constexpr PhysicalDisplayId INTERNAL_DISPLAY_ID(111); constexpr PhysicalDisplayId EXTERNAL_DISPLAY_ID(222); constexpr PhysicalDisplayId DISPLAY_ID_64BIT(0xabcd12349876fedcULL); - +constexpr std::chrono::duration VSYNC_PERIOD(16ms); class MockVSyncSource : public VSyncSource { public: const char* getName() const override { return "test"; } @@ -166,11 +166,14 @@ void EventThreadTest::createThread(std::unique_ptr<VSyncSource> source) { mThrottleVsyncCallRecorder.getInvocable()(expectedVsyncTimestamp, uid); return (uid == mThrottledConnectionUid); }; + const auto getVsyncPeriod = [](uid_t uid) { + return VSYNC_PERIOD.count(); + }; mThread = std::make_unique<impl::EventThread>(std::move(source), /*tokenManager=*/nullptr, mInterceptVSyncCallRecorder.getInvocable(), - throttleVsync); + throttleVsync, getVsyncPeriod); // EventThread should register itself as VSyncSource callback. mCallback = expectVSyncSetCallbackCallReceived(); |