Loading services/surfaceflinger/Scheduler/Scheduler.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -84,14 +84,14 @@ Scheduler::Scheduler(impl::EventControlThread::SetVSyncEnabledFunction function) Scheduler::~Scheduler() = default; sp<Scheduler::ConnectionHandle> Scheduler::createConnection( const std::string& connectionName, int64_t phaseOffsetNs, ResyncCallback resyncCallback, const char* connectionName, int64_t phaseOffsetNs, ResyncCallback resyncCallback, impl::EventThread::InterceptVSyncsCallback interceptCallback) { const int64_t id = sNextId++; ALOGV("Creating a connection handle with ID: %" PRId64 "\n", id); std::unique_ptr<EventThread> eventThread = makeEventThread(connectionName, mPrimaryDispSync.get(), phaseOffsetNs, interceptCallback); std::move(interceptCallback)); auto connection = std::make_unique<Connection>(new ConnectionHandle(id), eventThread->createEventConnection( std::move(resyncCallback)), Loading @@ -102,14 +102,13 @@ sp<Scheduler::ConnectionHandle> Scheduler::createConnection( } std::unique_ptr<EventThread> Scheduler::makeEventThread( const std::string& connectionName, DispSync* dispSync, int64_t phaseOffsetNs, const char* connectionName, DispSync* dispSync, int64_t phaseOffsetNs, impl::EventThread::InterceptVSyncsCallback interceptCallback) { const std::string sourceName = connectionName + "Source"; std::unique_ptr<VSyncSource> eventThreadSource = std::make_unique<DispSyncSource>(dispSync, phaseOffsetNs, true, sourceName.c_str()); const std::string threadName = connectionName + "Thread"; return std::make_unique<impl::EventThread>(std::move(eventThreadSource), interceptCallback, [this] { resetIdleTimer(); }, threadName.c_str()); std::make_unique<DispSyncSource>(dispSync, phaseOffsetNs, true, connectionName); return std::make_unique<impl::EventThread>(std::move(eventThreadSource), std::move(interceptCallback), [this] { resetIdleTimer(); }, connectionName); } sp<IDisplayEventConnection> Scheduler::createDisplayEventConnection( Loading services/surfaceflinger/Scheduler/Scheduler.h +2 −2 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ public: /** Creates an EventThread connection. */ sp<ConnectionHandle> createConnection( const std::string& connectionName, int64_t phaseOffsetNs, ResyncCallback resyncCallback, const char* connectionName, int64_t phaseOffsetNs, ResyncCallback resyncCallback, impl::EventThread::InterceptVSyncsCallback interceptCallback); sp<IDisplayEventConnection> createDisplayEventConnection(const sp<ConnectionHandle>& handle, Loading Loading @@ -123,7 +123,7 @@ public: protected: virtual std::unique_ptr<EventThread> makeEventThread( const std::string& connectionName, DispSync* dispSync, int64_t phaseOffsetNs, const char* connectionName, DispSync* dispSync, int64_t phaseOffsetNs, impl::EventThread::InterceptVSyncsCallback interceptCallback); private: Loading services/surfaceflinger/tests/unittests/SchedulerTest.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ protected: : Scheduler([](bool) {}), mEventThread(std::move(eventThread)) {} std::unique_ptr<EventThread> makeEventThread( const std::string& /* connectionName */, DispSync* /* dispSync */, const char* /* connectionName */, DispSync* /* dispSync */, nsecs_t /* phaseOffsetNs */, impl::EventThread::InterceptVSyncsCallback /* interceptCallback */) override { return std::move(mEventThread); Loading Loading
services/surfaceflinger/Scheduler/Scheduler.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -84,14 +84,14 @@ Scheduler::Scheduler(impl::EventControlThread::SetVSyncEnabledFunction function) Scheduler::~Scheduler() = default; sp<Scheduler::ConnectionHandle> Scheduler::createConnection( const std::string& connectionName, int64_t phaseOffsetNs, ResyncCallback resyncCallback, const char* connectionName, int64_t phaseOffsetNs, ResyncCallback resyncCallback, impl::EventThread::InterceptVSyncsCallback interceptCallback) { const int64_t id = sNextId++; ALOGV("Creating a connection handle with ID: %" PRId64 "\n", id); std::unique_ptr<EventThread> eventThread = makeEventThread(connectionName, mPrimaryDispSync.get(), phaseOffsetNs, interceptCallback); std::move(interceptCallback)); auto connection = std::make_unique<Connection>(new ConnectionHandle(id), eventThread->createEventConnection( std::move(resyncCallback)), Loading @@ -102,14 +102,13 @@ sp<Scheduler::ConnectionHandle> Scheduler::createConnection( } std::unique_ptr<EventThread> Scheduler::makeEventThread( const std::string& connectionName, DispSync* dispSync, int64_t phaseOffsetNs, const char* connectionName, DispSync* dispSync, int64_t phaseOffsetNs, impl::EventThread::InterceptVSyncsCallback interceptCallback) { const std::string sourceName = connectionName + "Source"; std::unique_ptr<VSyncSource> eventThreadSource = std::make_unique<DispSyncSource>(dispSync, phaseOffsetNs, true, sourceName.c_str()); const std::string threadName = connectionName + "Thread"; return std::make_unique<impl::EventThread>(std::move(eventThreadSource), interceptCallback, [this] { resetIdleTimer(); }, threadName.c_str()); std::make_unique<DispSyncSource>(dispSync, phaseOffsetNs, true, connectionName); return std::make_unique<impl::EventThread>(std::move(eventThreadSource), std::move(interceptCallback), [this] { resetIdleTimer(); }, connectionName); } sp<IDisplayEventConnection> Scheduler::createDisplayEventConnection( Loading
services/surfaceflinger/Scheduler/Scheduler.h +2 −2 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ public: /** Creates an EventThread connection. */ sp<ConnectionHandle> createConnection( const std::string& connectionName, int64_t phaseOffsetNs, ResyncCallback resyncCallback, const char* connectionName, int64_t phaseOffsetNs, ResyncCallback resyncCallback, impl::EventThread::InterceptVSyncsCallback interceptCallback); sp<IDisplayEventConnection> createDisplayEventConnection(const sp<ConnectionHandle>& handle, Loading Loading @@ -123,7 +123,7 @@ public: protected: virtual std::unique_ptr<EventThread> makeEventThread( const std::string& connectionName, DispSync* dispSync, int64_t phaseOffsetNs, const char* connectionName, DispSync* dispSync, int64_t phaseOffsetNs, impl::EventThread::InterceptVSyncsCallback interceptCallback); private: Loading
services/surfaceflinger/tests/unittests/SchedulerTest.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ protected: : Scheduler([](bool) {}), mEventThread(std::move(eventThread)) {} std::unique_ptr<EventThread> makeEventThread( const std::string& /* connectionName */, DispSync* /* dispSync */, const char* /* connectionName */, DispSync* /* dispSync */, nsecs_t /* phaseOffsetNs */, impl::EventThread::InterceptVSyncsCallback /* interceptCallback */) override { return std::move(mEventThread); Loading