Loading services/surfaceflinger/Scheduler/Scheduler.cpp +1 −5 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ #include <FrameTimeline/FrameTimeline.h> #include <scheduler/interface/ICompositor.h> #include <algorithm> #include <cinttypes> #include <cstdint> #include <functional> Loading @@ -46,16 +45,15 @@ #include <numeric> #include <common/FlagManager.h> #include "../Layer.h" #include "EventThread.h" #include "FrameRateOverrideMappings.h" #include "FrontEnd/LayerHandle.h" #include "Layer.h" #include "OneShotTimer.h" #include "RefreshRateStats.h" #include "SurfaceFlingerFactory.h" #include "SurfaceFlingerProperties.h" #include "TimeStats/TimeStats.h" #include "VSyncTracker.h" #include "VsyncConfiguration.h" #include "VsyncController.h" #include "VsyncSchedule.h" Loading Loading @@ -361,10 +359,8 @@ void Scheduler::createEventThread(Cycle cycle, frametimeline::TokenManager* toke if (cycle == Cycle::Render) { mRenderEventThread = std::move(eventThread); mRenderEventConnection = mRenderEventThread->createEventConnection(); } else { mLastCompositeEventThread = std::move(eventThread); mLastCompositeEventConnection = mLastCompositeEventThread->createEventConnection(); } } Loading services/surfaceflinger/Scheduler/Scheduler.h +0 −7 Original line number Diff line number Diff line Loading @@ -145,10 +145,6 @@ public: Cycle, EventRegistrationFlags eventRegistration = {}, const sp<IBinder>& layerHandle = nullptr) EXCLUDES(mChoreographerLock); const sp<EventThreadConnection>& getEventConnection(Cycle cycle) const { return cycle == Cycle::Render ? mRenderEventConnection : mLastCompositeEventConnection; } enum class Hotplug { Connected, Disconnected }; void dispatchHotplug(PhysicalDisplayId, Hotplug); Loading Loading @@ -467,10 +463,7 @@ private: void onExpectedPresentTimePosted(TimePoint expectedPresentTime) override EXCLUDES(mDisplayLock); std::unique_ptr<EventThread> mRenderEventThread; sp<EventThreadConnection> mRenderEventConnection; std::unique_ptr<EventThread> mLastCompositeEventThread; sp<EventThreadConnection> mLastCompositeEventConnection; std::atomic<nsecs_t> mLastResyncTime = 0; Loading services/surfaceflinger/tests/unittests/DisplayTransactionTest.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -64,17 +64,6 @@ DisplayTransactionTest::~DisplayTransactionTest() { void DisplayTransactionTest::injectMockScheduler(PhysicalDisplayId displayId) { LOG_ALWAYS_FATAL_IF(mFlinger.scheduler()); EXPECT_CALL(*mEventThread, registerDisplayEventConnection(_)); EXPECT_CALL(*mEventThread, createEventConnection(_, _)) .WillOnce(Return( sp<EventThreadConnection>::make(mEventThread, mock::EventThread::kCallingUid))); EXPECT_CALL(*mSFEventThread, registerDisplayEventConnection(_)); EXPECT_CALL(*mSFEventThread, createEventConnection(_, _)) .WillOnce(Return(sp<EventThreadConnection>::make(mSFEventThread, mock::EventThread::kCallingUid))); mFlinger.setupScheduler(std::make_unique<mock::VsyncController>(), std::make_shared<mock::VSyncTracker>(), std::unique_ptr<EventThread>(mEventThread), Loading services/surfaceflinger/tests/unittests/SchedulerTest.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -124,7 +124,7 @@ SchedulerTest::SchedulerTest() { // createConnection call to scheduler makes a createEventConnection call to EventThread. Make // sure that call gets executed and returns an EventThread::Connection object. EXPECT_CALL(*mEventThread, createEventConnection(_, _)) EXPECT_CALL(*mEventThread, createEventConnection(_)) .WillRepeatedly(Return(mEventThreadConnection)); mScheduler->setEventThread(Cycle::Render, std::move(eventThread)); Loading Loading @@ -797,7 +797,7 @@ TEST_F(AttachedChoreographerTest, registerMultipleOnSameLayer) { const auto mockConnection1 = sp<MockEventThreadConnection>::make(mEventThread); const auto mockConnection2 = sp<MockEventThreadConnection>::make(mEventThread); EXPECT_CALL(*mEventThread, createEventConnection(_, _)) EXPECT_CALL(*mEventThread, createEventConnection(_)) .WillOnce(Return(mockConnection1)) .WillOnce(Return(mockConnection2)); Loading services/surfaceflinger/tests/unittests/SurfaceFlinger_DisplayModeSwitching.cpp +0 −10 Original line number Diff line number Diff line Loading @@ -187,16 +187,6 @@ void DisplayModeSwitchingTest::setupScheduler( mAppEventThread = eventThread.get(); auto sfEventThread = std::make_unique<mock::EventThread>(); EXPECT_CALL(*eventThread, registerDisplayEventConnection(_)); EXPECT_CALL(*eventThread, createEventConnection(_, _)) .WillOnce(Return(sp<EventThreadConnection>::make(eventThread.get(), mock::EventThread::kCallingUid))); EXPECT_CALL(*sfEventThread, registerDisplayEventConnection(_)); EXPECT_CALL(*sfEventThread, createEventConnection(_, _)) .WillOnce(Return(sp<EventThreadConnection>::make(sfEventThread.get(), mock::EventThread::kCallingUid))); auto vsyncController = std::make_unique<mock::VsyncController>(); auto vsyncTracker = std::make_shared<mock::VSyncTracker>(); Loading Loading
services/surfaceflinger/Scheduler/Scheduler.cpp +1 −5 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ #include <FrameTimeline/FrameTimeline.h> #include <scheduler/interface/ICompositor.h> #include <algorithm> #include <cinttypes> #include <cstdint> #include <functional> Loading @@ -46,16 +45,15 @@ #include <numeric> #include <common/FlagManager.h> #include "../Layer.h" #include "EventThread.h" #include "FrameRateOverrideMappings.h" #include "FrontEnd/LayerHandle.h" #include "Layer.h" #include "OneShotTimer.h" #include "RefreshRateStats.h" #include "SurfaceFlingerFactory.h" #include "SurfaceFlingerProperties.h" #include "TimeStats/TimeStats.h" #include "VSyncTracker.h" #include "VsyncConfiguration.h" #include "VsyncController.h" #include "VsyncSchedule.h" Loading Loading @@ -361,10 +359,8 @@ void Scheduler::createEventThread(Cycle cycle, frametimeline::TokenManager* toke if (cycle == Cycle::Render) { mRenderEventThread = std::move(eventThread); mRenderEventConnection = mRenderEventThread->createEventConnection(); } else { mLastCompositeEventThread = std::move(eventThread); mLastCompositeEventConnection = mLastCompositeEventThread->createEventConnection(); } } Loading
services/surfaceflinger/Scheduler/Scheduler.h +0 −7 Original line number Diff line number Diff line Loading @@ -145,10 +145,6 @@ public: Cycle, EventRegistrationFlags eventRegistration = {}, const sp<IBinder>& layerHandle = nullptr) EXCLUDES(mChoreographerLock); const sp<EventThreadConnection>& getEventConnection(Cycle cycle) const { return cycle == Cycle::Render ? mRenderEventConnection : mLastCompositeEventConnection; } enum class Hotplug { Connected, Disconnected }; void dispatchHotplug(PhysicalDisplayId, Hotplug); Loading Loading @@ -467,10 +463,7 @@ private: void onExpectedPresentTimePosted(TimePoint expectedPresentTime) override EXCLUDES(mDisplayLock); std::unique_ptr<EventThread> mRenderEventThread; sp<EventThreadConnection> mRenderEventConnection; std::unique_ptr<EventThread> mLastCompositeEventThread; sp<EventThreadConnection> mLastCompositeEventConnection; std::atomic<nsecs_t> mLastResyncTime = 0; Loading
services/surfaceflinger/tests/unittests/DisplayTransactionTest.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -64,17 +64,6 @@ DisplayTransactionTest::~DisplayTransactionTest() { void DisplayTransactionTest::injectMockScheduler(PhysicalDisplayId displayId) { LOG_ALWAYS_FATAL_IF(mFlinger.scheduler()); EXPECT_CALL(*mEventThread, registerDisplayEventConnection(_)); EXPECT_CALL(*mEventThread, createEventConnection(_, _)) .WillOnce(Return( sp<EventThreadConnection>::make(mEventThread, mock::EventThread::kCallingUid))); EXPECT_CALL(*mSFEventThread, registerDisplayEventConnection(_)); EXPECT_CALL(*mSFEventThread, createEventConnection(_, _)) .WillOnce(Return(sp<EventThreadConnection>::make(mSFEventThread, mock::EventThread::kCallingUid))); mFlinger.setupScheduler(std::make_unique<mock::VsyncController>(), std::make_shared<mock::VSyncTracker>(), std::unique_ptr<EventThread>(mEventThread), Loading
services/surfaceflinger/tests/unittests/SchedulerTest.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -124,7 +124,7 @@ SchedulerTest::SchedulerTest() { // createConnection call to scheduler makes a createEventConnection call to EventThread. Make // sure that call gets executed and returns an EventThread::Connection object. EXPECT_CALL(*mEventThread, createEventConnection(_, _)) EXPECT_CALL(*mEventThread, createEventConnection(_)) .WillRepeatedly(Return(mEventThreadConnection)); mScheduler->setEventThread(Cycle::Render, std::move(eventThread)); Loading Loading @@ -797,7 +797,7 @@ TEST_F(AttachedChoreographerTest, registerMultipleOnSameLayer) { const auto mockConnection1 = sp<MockEventThreadConnection>::make(mEventThread); const auto mockConnection2 = sp<MockEventThreadConnection>::make(mEventThread); EXPECT_CALL(*mEventThread, createEventConnection(_, _)) EXPECT_CALL(*mEventThread, createEventConnection(_)) .WillOnce(Return(mockConnection1)) .WillOnce(Return(mockConnection2)); Loading
services/surfaceflinger/tests/unittests/SurfaceFlinger_DisplayModeSwitching.cpp +0 −10 Original line number Diff line number Diff line Loading @@ -187,16 +187,6 @@ void DisplayModeSwitchingTest::setupScheduler( mAppEventThread = eventThread.get(); auto sfEventThread = std::make_unique<mock::EventThread>(); EXPECT_CALL(*eventThread, registerDisplayEventConnection(_)); EXPECT_CALL(*eventThread, createEventConnection(_, _)) .WillOnce(Return(sp<EventThreadConnection>::make(eventThread.get(), mock::EventThread::kCallingUid))); EXPECT_CALL(*sfEventThread, registerDisplayEventConnection(_)); EXPECT_CALL(*sfEventThread, createEventConnection(_, _)) .WillOnce(Return(sp<EventThreadConnection>::make(sfEventThread.get(), mock::EventThread::kCallingUid))); auto vsyncController = std::make_unique<mock::VsyncController>(); auto vsyncTracker = std::make_shared<mock::VSyncTracker>(); Loading