Lines Matching refs:mScheduler

105     TestableScheduler* mScheduler = new TestableScheduler{mSelector, mFlinger, mSchedulerCallback};  member in android::scheduler::__anon810a6bab0111::SchedulerTest
124 mScheduler->setEventThread(Cycle::Render, std::move(eventThread)); in SchedulerTest()
126 mFlinger.resetScheduler(mScheduler); in SchedulerTest()
134 mScheduler->registerDisplay(kDisplayId1, in TEST_F()
146 mScheduler->registerDisplay(kDisplayId2, in TEST_F()
149 mScheduler->registerDisplay(kDisplayId3, in TEST_F()
153 EXPECT_FALSE(mScheduler->getVsyncSchedule(kDisplayId1)->getPendingHardwareVsyncState()); in TEST_F()
154 EXPECT_FALSE(mScheduler->getVsyncSchedule(kDisplayId2)->getPendingHardwareVsyncState()); in TEST_F()
155 EXPECT_FALSE(mScheduler->getVsyncSchedule(kDisplayId3)->getPendingHardwareVsyncState()); in TEST_F()
163 ASSERT_EQ(0u, mScheduler->getNumActiveLayers()); in TEST_F()
164 mScheduler->recordLayerHistory(layer->getSequence(), layer->getLayerProps(), 0, 0, in TEST_F()
166 ASSERT_EQ(0u, mScheduler->getNumActiveLayers()); in TEST_F()
169 FTL_FAKE_GUARD(kMainThreadContext, mScheduler->setDisplayPowerMode(kDisplayId1, kPowerModeOn)); in TEST_F()
172 mScheduler->onActiveDisplayAreaChanged(kDisplayArea); in TEST_F()
175 mScheduler->chooseRefreshRateForContent(/*LayerHierarchy*/ nullptr, in TEST_F()
180 ASSERT_EQ(0u, mScheduler->layerHistorySize()); in TEST_F()
182 ASSERT_EQ(1u, mScheduler->layerHistorySize()); in TEST_F()
185 mScheduler->registerDisplay(kDisplayId1, in TEST_F()
189 ASSERT_EQ(0u, mScheduler->getNumActiveLayers()); in TEST_F()
190 mScheduler->recordLayerHistory(layer->getSequence(), layer->getLayerProps(), 0, 0, in TEST_F()
192 ASSERT_EQ(1u, mScheduler->getNumActiveLayers()); in TEST_F()
196 mScheduler->clearCachedReportedMode(); in TEST_F()
199 EXPECT_NO_FATAL_FAILURE(mScheduler->dispatchCachedReportedMode()); in TEST_F()
222 mScheduler->registerDisplay(kDisplayId1, in TEST_F()
229 mScheduler->recordLayerHistory(layer->getSequence(), layer->getLayerProps(), 0, systemTime(), in TEST_F()
233 FTL_FAKE_GUARD(kMainThreadContext, mScheduler->setDisplayPowerMode(kDisplayId1, kPowerModeOn)); in TEST_F()
236 mScheduler->onActiveDisplayAreaChanged(kDisplayArea); in TEST_F()
239 mScheduler->chooseRefreshRateForContent(/*LayerHierarchy*/ nullptr, in TEST_F()
244 mScheduler->chooseRefreshRateForContent(/*LayerHierarchy*/ nullptr, in TEST_F()
249 mScheduler->registerDisplay(kDisplayId1, in TEST_F()
255 mScheduler->setContentRequirements(layers); in TEST_F()
257 mScheduler->setTouchStateAndIdleTimerPolicy(globalSignals); in TEST_F()
261 auto modeChoices = mScheduler->chooseDisplayModes(); in TEST_F()
269 mScheduler->setTouchStateAndIdleTimerPolicy(globalSignals); in TEST_F()
271 modeChoices = mScheduler->chooseDisplayModes(); in TEST_F()
279 mScheduler->replaceTouchTimer(10); in TEST_F()
280 mScheduler->setTouchStateAndIdleTimerPolicy(globalSignals); in TEST_F()
282 modeChoices = mScheduler->chooseDisplayModes(); in TEST_F()
291 mScheduler->registerDisplay(kDisplayId1, in TEST_F()
309 mScheduler->setContentRequirements(layers); in TEST_F()
310 auto modeChoices = mScheduler->chooseDisplayModes(); in TEST_F()
323 mScheduler->setContentRequirements(layers); in TEST_F()
324 modeChoices = mScheduler->chooseDisplayModes(); in TEST_F()
337 mScheduler->setContentRequirements(layers); in TEST_F()
338 modeChoices = mScheduler->chooseDisplayModes(); in TEST_F()
347 mScheduler->registerDisplay(kDisplayId1, in TEST_F()
351 mScheduler->registerDisplay(kDisplayId2, in TEST_F()
356 mScheduler->setDisplayPowerMode(kDisplayId1, hal::PowerMode::ON); in TEST_F()
357 mScheduler->setDisplayPowerMode(kDisplayId2, hal::PowerMode::ON); in TEST_F()
375 mScheduler->setContentRequirements(layers); in TEST_F()
376 mScheduler->setTouchStateAndIdleTimerPolicy(globalSignals); in TEST_F()
378 const auto actualChoices = mScheduler->chooseDisplayModes(); in TEST_F()
392 mScheduler->setTouchStateAndIdleTimerPolicy(globalSignals); in TEST_F()
394 const auto actualChoices = mScheduler->chooseDisplayModes(); in TEST_F()
399 mScheduler->replaceTouchTimer(10); in TEST_F()
400 mScheduler->setTouchStateAndIdleTimerPolicy(globalSignals); in TEST_F()
411 const auto actualChoices = mScheduler->chooseDisplayModes(); in TEST_F()
417 mScheduler->registerDisplay(kDisplayId3, in TEST_F()
421 mScheduler->setDisplayPowerMode(kDisplayId3, hal::PowerMode::ON); in TEST_F()
424 mScheduler->replaceTouchTimer(10); in TEST_F()
425 mScheduler->setTouchStateAndIdleTimerPolicy(globalSignals); in TEST_F()
437 const auto actualChoices = mScheduler->chooseDisplayModes(); in TEST_F()
442 mScheduler->setPacesetterDisplay(kDisplayId3); in TEST_F()
444 mScheduler->replaceTouchTimer(10); in TEST_F()
445 mScheduler->setTouchStateAndIdleTimerPolicy(globalSignals); in TEST_F()
457 const auto actualChoices = mScheduler->chooseDisplayModes(); in TEST_F()
464 mScheduler->registerDisplay(kDisplayId1, in TEST_F()
468 mScheduler->registerDisplay(kDisplayId2, in TEST_F()
531 } compositor(*mScheduler); in TEST_F()
533 mScheduler->doFrameSignal(compositor, VsyncId(42)); in TEST_F()
550 mScheduler->doFrameSignal(compositor, VsyncId(43)); in TEST_F()
560 mScheduler->doFrameSignal(compositor, VsyncId(44)); in TEST_F()
630 EXPECT_CALL(mScheduler->mockRequestHardwareVsync, Call(kDisplayId1, true)).Times(1); in TEST_F()
631 EXPECT_CALL(mScheduler->mockRequestHardwareVsync, Call(kDisplayId2, true)).Times(1); in TEST_F()
633 mScheduler->registerDisplay(kDisplayId2, in TEST_F()
636 mScheduler->setDisplayPowerMode(kDisplayId1, hal::PowerMode::ON); in TEST_F()
637 mScheduler->setDisplayPowerMode(kDisplayId2, hal::PowerMode::ON); in TEST_F()
640 mScheduler->disableHardwareVsync(kDisplayId1, kDisallow); in TEST_F()
641 mScheduler->disableHardwareVsync(kDisplayId2, kDisallow); in TEST_F()
644 mScheduler->resyncAllToHardwareVsync(kAllowToEnable); in TEST_F()
650 EXPECT_CALL(mScheduler->mockRequestHardwareVsync, Call(kDisplayId1, _)).Times(0); in TEST_F()
652 mScheduler->setDisplayPowerMode(kDisplayId1, hal::PowerMode::ON); in TEST_F()
655 mScheduler->disableHardwareVsync(kDisplayId1, kDisallow); in TEST_F()
658 mScheduler->resyncAllToHardwareVsync(kAllowToEnable); in TEST_F()
666 EXPECT_CALL(mScheduler->mockRequestHardwareVsync, Call(kDisplayId1, true)).Times(1); in TEST_F()
667 EXPECT_CALL(mScheduler->mockRequestHardwareVsync, Call(kDisplayId2, _)).Times(0); in TEST_F()
669 mScheduler->setDisplayPowerMode(kDisplayId1, hal::PowerMode::ON); in TEST_F()
671 mScheduler->registerDisplay(kDisplayId2, in TEST_F()
674 ASSERT_EQ(hal::PowerMode::OFF, mScheduler->getDisplayPowerMode(kDisplayId2)); in TEST_F()
677 mScheduler->disableHardwareVsync(kDisplayId1, kDisallow); in TEST_F()
678 mScheduler->disableHardwareVsync(kDisplayId2, kDisallow); in TEST_F()
681 mScheduler->resyncAllToHardwareVsync(kAllowToEnable); in TEST_F()
688 EXPECT_CALL(mScheduler->mockRequestHardwareVsync, Call(kDisplayId1, true)).Times(1); in TEST_F()
689 EXPECT_CALL(mScheduler->mockRequestHardwareVsync, Call(kDisplayId2, true)).Times(1); in TEST_F()
691 mScheduler->setDisplayPowerMode(kDisplayId1, hal::PowerMode::ON); in TEST_F()
693 mScheduler->registerDisplay(kDisplayId2, in TEST_F()
696 ASSERT_EQ(hal::PowerMode::OFF, mScheduler->getDisplayPowerMode(kDisplayId2)); in TEST_F()
699 mScheduler->disableHardwareVsync(kDisplayId1, kDisallow); in TEST_F()
700 mScheduler->disableHardwareVsync(kDisplayId2, kDisallow); in TEST_F()
703 mScheduler->resyncAllToHardwareVsync(kAllowToEnable); in TEST_F()
713 EXPECT_TRUE(mScheduler->mutableAttachedChoreographers().empty()); in TEST_F()
719 mScheduler->createDisplayEventConnection(Cycle::Render, {}, layer->getHandle()); in TEST_F()
721 EXPECT_EQ(1u, mScheduler->mutableAttachedChoreographers().size()); in TEST_F()
722 ASSERT_EQ(1u, mScheduler->mutableAttachedChoreographers().count(layer->getSequence())); in TEST_F()
724 mScheduler->mutableAttachedChoreographers()[layer->getSequence()].connections.size()); in TEST_F()
726 mScheduler->mutableAttachedChoreographers()[layer->getSequence()].frameRate.isValid()); in TEST_F()
730 EXPECT_TRUE(mScheduler->mutableAttachedChoreographers().empty()); in TEST_F()
748 mScheduler->createDisplayEventConnection(Cycle::Render, {}, handle); in TEST_F()
750 mScheduler->createDisplayEventConnection(Cycle::Render, {}, handle); in TEST_F()
752 EXPECT_EQ(1u, mScheduler->mutableAttachedChoreographers().size()); in TEST_F()
753 ASSERT_EQ(1u, mScheduler->mutableAttachedChoreographers().count(layer->getSequence())); in TEST_F()
755 mScheduler->mutableAttachedChoreographers()[layer->getSequence()].connections.size()); in TEST_F()
757 mScheduler->mutableAttachedChoreographers()[layer->getSequence()].frameRate.isValid()); in TEST_F()
761 EXPECT_TRUE(mScheduler->mutableAttachedChoreographers().empty()); in TEST_F()
768 mScheduler->createDisplayEventConnection(Cycle::Render, {}, layer1->getHandle()); in TEST_F()
770 mScheduler->createDisplayEventConnection(Cycle::Render, {}, layer2->getHandle()); in TEST_F()
772 EXPECT_EQ(2u, mScheduler->mutableAttachedChoreographers().size()); in TEST_F()
774 ASSERT_EQ(1u, mScheduler->mutableAttachedChoreographers().count(layer1->getSequence())); in TEST_F()
776 mScheduler->mutableAttachedChoreographers()[layer1->getSequence()] in TEST_F()
779 mScheduler->mutableAttachedChoreographers()[layer1->getSequence()].frameRate.isValid()); in TEST_F()
781 ASSERT_EQ(1u, mScheduler->mutableAttachedChoreographers().count(layer2->getSequence())); in TEST_F()
783 mScheduler->mutableAttachedChoreographers()[layer2->getSequence()] in TEST_F()
786 mScheduler->mutableAttachedChoreographers()[layer2->getSequence()].frameRate.isValid()); in TEST_F()
790 EXPECT_TRUE(mScheduler->mutableAttachedChoreographers().empty()); in TEST_F()
797 mScheduler->createDisplayEventConnection(Cycle::Render, {}, layer->getHandle()); in TEST_F()
799 ASSERT_EQ(1u, mScheduler->mutableAttachedChoreographers().count(layer->getSequence())); in TEST_F()
801 mScheduler->mutableAttachedChoreographers()[layer->getSequence()].connections.size()); in TEST_F()
809 mScheduler->mutableAttachedChoreographers()[layer->getSequence()].connections.clear(); in TEST_F()
810 mScheduler->mutableAttachedChoreographers()[layer->getSequence()].connections.emplace( in TEST_F()
816 mScheduler->updateAttachedChoreographers(hierarchy, 60_Hz); in TEST_F()
817 EXPECT_TRUE(mScheduler->mutableAttachedChoreographers().empty()); in TEST_F()
821 EXPECT_TRUE(mScheduler->mutableAttachedChoreographers().empty()); in TEST_F()
827 mScheduler->createDisplayEventConnection(Cycle::Render, {}, layer->getHandle()); in TEST_F()
831 EXPECT_TRUE(mScheduler->mutableAttachedChoreographers().empty()); in TEST_F()
841 mScheduler->createDisplayEventConnection(Cycle::Render, {}, layer->getHandle()); in frameRateTestScenario()
849 mScheduler->updateAttachedChoreographers(hierarchy, displayFps); in frameRateTestScenario()
851 ASSERT_EQ(1u, mScheduler->mutableAttachedChoreographers().count(layer->getSequence())); in frameRateTestScenario()
853 mScheduler->mutableAttachedChoreographers()[layer->getSequence()].frameRate); in frameRateTestScenario()
901 mScheduler->createDisplayEventConnection(Cycle::Render, {}, parent->getHandle()); in TEST_F()
914 mScheduler->updateAttachedChoreographers(parentHierarchy, 120_Hz); in TEST_F()
916 ASSERT_EQ(1u, mScheduler->mutableAttachedChoreographers().count(parent->getSequence())); in TEST_F()
918 EXPECT_EQ(30_Hz, mScheduler->mutableAttachedChoreographers()[parent->getSequence()].frameRate); in TEST_F()
928 mScheduler->createDisplayEventConnection(Cycle::Render, {}, parent->getHandle()); in TEST_F()
949 mScheduler->updateAttachedChoreographers(parentHierarchy, 120_Hz); in TEST_F()
951 ASSERT_EQ(1u, mScheduler->mutableAttachedChoreographers().count(parent->getSequence())); in TEST_F()
953 EXPECT_EQ(60_Hz, mScheduler->mutableAttachedChoreographers()[parent->getSequence()].frameRate); in TEST_F()
963 mScheduler->createDisplayEventConnection(Cycle::Render, {}, parent->getHandle()); in TEST_F()
984 mScheduler->updateAttachedChoreographers(parentHierarchy, 120_Hz); in TEST_F()
986 ASSERT_EQ(1u, mScheduler->mutableAttachedChoreographers().count(parent->getSequence())); in TEST_F()
988 EXPECT_EQ(Fps(), mScheduler->mutableAttachedChoreographers()[parent->getSequence()].frameRate); in TEST_F()
997 mScheduler->createDisplayEventConnection(Cycle::Render, {}, layer->getHandle()); in TEST_F()
1010 mScheduler->updateAttachedChoreographers(parentHierarchy, 120_Hz); in TEST_F()
1012 ASSERT_EQ(1u, mScheduler->mutableAttachedChoreographers().count(layer->getSequence())); in TEST_F()
1014 EXPECT_EQ(30_Hz, mScheduler->mutableAttachedChoreographers()[layer->getSequence()].frameRate); in TEST_F()
1023 mScheduler->createDisplayEventConnection(Cycle::Render, {}, layer->getHandle()); in TEST_F()
1039 mScheduler->updateAttachedChoreographers(parentHierarchy, 120_Hz); in TEST_F()
1041 ASSERT_EQ(1u, mScheduler->mutableAttachedChoreographers().count(layer->getSequence())); in TEST_F()
1043 EXPECT_EQ(60_Hz, mScheduler->mutableAttachedChoreographers()[layer->getSequence()].frameRate); in TEST_F()