Lines Matching refs:mPeriod
48 MockVSyncTracker(nsecs_t period) : mPeriod{period} { in MockVSyncTracker()
57 if (timePoint % mPeriod == 0) { in nextVSyncTime()
60 return (timePoint - (timePoint % mPeriod) + mPeriod); in nextVSyncTime()
63 nsecs_t getCurrentPeriod() const { return mPeriod; } in getCurrentPeriod()
66 nsecs_t const mPeriod; member in android::scheduler::MockVSyncTracker
228 nsecs_t const mPeriod = 1000; member in android::scheduler::VSyncDispatchTimerQueueTest
231 std::make_shared<NiceMock<MockVSyncTracker>>(mPeriod);
256 auto intended = mPeriod - 230; in TEST_F()
270 EXPECT_THAT(cb.mCalls[0], Eq(mPeriod)); in TEST_F()
274 auto intended = mPeriod - 230; in TEST_F()
296 EXPECT_THAT(cb.mCalls[0], Eq(mPeriod)); in TEST_F()
301 auto intended = mPeriod - 230; in TEST_F()
312 nextAnticipatedVSyncTimeFrom(1000, std::optional<nsecs_t>(mPeriod))) in TEST_F()
317 mDispatch->schedule(cb, {.workDuration = 100, .readyDuration = 0, .lastVsync = mPeriod}); in TEST_F()
327 auto const workDuration = 10 * mPeriod; in TEST_F()
329 nextAnticipatedVSyncTimeFrom(now + workDuration, std::optional<nsecs_t>(mPeriod))) in TEST_F()
330 .WillOnce(Return(mPeriod * 11)); in TEST_F()
331 EXPECT_CALL(mMockClock, alarmAt(_, mPeriod)); in TEST_F()
337 .lastVsync = mPeriod}); in TEST_F()
339 EXPECT_EQ(mPeriod, result->callbackTime.ns()); in TEST_F()
340 EXPECT_EQ(workDuration + mPeriod, result->vsyncTime.ns()); in TEST_F()
350 {.workDuration = 100, .readyDuration = 0, .lastVsync = mPeriod}); in TEST_F()
352 EXPECT_EQ(mPeriod - 100, result->callbackTime.ns()); in TEST_F()
353 EXPECT_EQ(mPeriod, result->vsyncTime.ns()); in TEST_F()
364 {.workDuration = 100, .readyDuration = 0, .lastVsync = mPeriod}); in TEST_F()
366 EXPECT_EQ(mPeriod - 100, result->callbackTime.ns()); in TEST_F()
367 EXPECT_EQ(mPeriod, result->vsyncTime.ns()); in TEST_F()
379 {.workDuration = 100, .readyDuration = 0, .lastVsync = mPeriod}); in TEST_F()
381 EXPECT_EQ(mPeriod - 100, result->callbackTime.ns()); in TEST_F()
382 EXPECT_EQ(mPeriod, result->vsyncTime.ns()); in TEST_F()
401 {.workDuration = 100, .readyDuration = 0, .lastVsync = mPeriod}); in TEST_F()
403 EXPECT_EQ(mPeriod - 100, result->callbackTime.ns()); in TEST_F()
404 EXPECT_EQ(mPeriod, result->vsyncTime.ns()); in TEST_F()
435 mDispatch->schedule(cb0, {.workDuration = 100, .readyDuration = 0, .lastVsync = mPeriod}); in TEST_F()
436 mDispatch->schedule(cb1, {.workDuration = 250, .readyDuration = 0, .lastVsync = mPeriod}); in TEST_F()
500 mDispatch->schedule(cb0, {.workDuration = 100, .readyDuration = 0, .lastVsync = mPeriod * 10}); in TEST_F()
501 mDispatch->schedule(cb1, {.workDuration = 250, .readyDuration = 0, .lastVsync = mPeriod}); in TEST_F()
554 EXPECT_THAT(cb0.mCalls[0], Eq(mPeriod)); in TEST_F()
556 EXPECT_THAT(cb1.mCalls[0], Eq(mPeriod)); in TEST_F()
637 EXPECT_EQ(mPeriod + timestamp - 400, result->callbackTime.ns()); in TEST_F()
638 EXPECT_EQ(mPeriod + timestamp, result->vsyncTime.ns()); in TEST_F()
644 EXPECT_EQ(mPeriod + timestamp - 400, result->callbackTime.ns()); in TEST_F()
645 EXPECT_EQ(mPeriod + timestamp, result->vsyncTime.ns()); in TEST_F()
651 EXPECT_EQ(mPeriod + timestamp - 400, result->callbackTime.ns()); in TEST_F()
652 EXPECT_EQ(mPeriod + timestamp, result->vsyncTime.ns()); in TEST_F()
1107 auto intended = mPeriod - 230; in TEST_F()
1120 EXPECT_THAT(cb.mCalls[0], Eq(mPeriod)); in TEST_F()
1225 nsecs_t const mPeriod = 1000; member in android::scheduler::VSyncDispatchTimerQueueEntryTest
1228 std::make_shared<NiceMock<MockVSyncTracker>>(mPeriod);
1311 EXPECT_THAT(vsyncCalledTime, Eq(mPeriod)); in TEST_F()
1316 EXPECT_THAT(*lastCalledTarget, Eq(mPeriod)); in TEST_F()
1470 EXPECT_THAT(*entry.wakeupTime(), Eq(mPeriod - effectualOffset)); in TEST_F()
1492 EXPECT_EQ(mPeriod, scheduleResult.vsyncTime.ns()); in TEST_F()
1504 EXPECT_THAT(vsyncCalledTime, Eq(mPeriod)); in TEST_F()
1509 EXPECT_THAT(*lastCalledTarget, Eq(mPeriod)); in TEST_F()