diff options
author | Ady Abraham <adyabr@google.com> | 2020-07-22 21:16:18 -0700 |
---|---|---|
committer | Ady Abraham <adyabr@google.com> | 2020-08-24 18:12:07 -0700 |
commit | 9c53ee710ecfe4657d08ce58f1609dfb0350237d (patch) | |
tree | c15ad8836a90a15e8b0649680f7aed2bda0d8cd1 /services/surfaceflinger/tests/unittests/SchedulerTest.cpp | |
parent | 60bc00c11df600575e85b4c3276027bcd6069c9b (diff) |
SurfaceFlinger: use duration instead of offset
This change is using the duration given to sf/app without
converting them back to the legacy offset. This allows us to get
the expected vsync associated with a wakeup event.
This change also required some refactoring:
- Move the periodic callback interface out of DispSync and in
to DispSyncSource
- Translate legacy offsets to duration in case that duration
is not specified in the build files
- Add support to VSD to expose the deadline timestamp of when
a frame needs to be ready by
Bug: 162888874
Test: SF unit tests
Test: examine systraces
Change-Id: I87a53cc7dea931d3c195eab6842e003ca4516885
Diffstat (limited to 'services/surfaceflinger/tests/unittests/SchedulerTest.cpp')
-rw-r--r-- | services/surfaceflinger/tests/unittests/SchedulerTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/surfaceflinger/tests/unittests/SchedulerTest.cpp b/services/surfaceflinger/tests/unittests/SchedulerTest.cpp index 39e793a83c..35619a38d7 100644 --- a/services/surfaceflinger/tests/unittests/SchedulerTest.cpp +++ b/services/surfaceflinger/tests/unittests/SchedulerTest.cpp @@ -120,8 +120,8 @@ TEST_F(SchedulerTest, invalidConnectionHandle) { mScheduler.dump(handle, output); EXPECT_TRUE(output.empty()); - EXPECT_CALL(*mEventThread, setPhaseOffset(_)).Times(0); - mScheduler.setPhaseOffset(handle, 10); + EXPECT_CALL(*mEventThread, setDuration(10ns, 20ns)).Times(0); + mScheduler.setDuration(handle, 10ns, 20ns); } TEST_F(SchedulerTest, validConnectionHandle) { @@ -146,8 +146,8 @@ TEST_F(SchedulerTest, validConnectionHandle) { mScheduler.dump(mConnectionHandle, output); EXPECT_FALSE(output.empty()); - EXPECT_CALL(*mEventThread, setPhaseOffset(10)).Times(1); - mScheduler.setPhaseOffset(mConnectionHandle, 10); + EXPECT_CALL(*mEventThread, setDuration(10ns, 20ns)).Times(1); + mScheduler.setDuration(mConnectionHandle, 10ns, 20ns); static constexpr size_t kEventConnections = 5; EXPECT_CALL(*mEventThread, getEventThreadConnectionCount()).WillOnce(Return(kEventConnections)); |