diff options
| -rw-r--r-- | services/surfaceflinger/Scheduler/DispSync.cpp | 25 | ||||
| -rw-r--r-- | services/surfaceflinger/Scheduler/EventThread.h | 9 | ||||
| -rw-r--r-- | services/surfaceflinger/Scheduler/MessageQueue.h | 2 | ||||
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 2 |
4 files changed, 5 insertions, 33 deletions
diff --git a/services/surfaceflinger/Scheduler/DispSync.cpp b/services/surfaceflinger/Scheduler/DispSync.cpp index 5296da9652..6599f9e340 100644 --- a/services/surfaceflinger/Scheduler/DispSync.cpp +++ b/services/surfaceflinger/Scheduler/DispSync.cpp @@ -789,31 +789,6 @@ void DispSync::dump(std::string& result) const { StringAppendF(&result, "current monotonic time: %" PRId64 "\n", now); } -// TODO(b/113612090): Figure out how much of this is still relevant. -// We need to determine the time when a buffer acquired now will be -// displayed. This can be calculated: -// time when previous buffer's actual-present fence was signaled -// + current display refresh rate * HWC latency -// + a little extra padding -// -// Buffer producers are expected to set their desired presentation time -// based on choreographer time stamps, which (coming from vsync events) -// will be slightly later then the actual-present timing. If we get a -// desired-present time that is unintentionally a hair after the next -// vsync, we'll hold the frame when we really want to display it. We -// need to take the offset between actual-present and reported-vsync -// into account. -// -// If the system is configured without a DispSync phase offset for the app, -// we also want to throw in a bit of padding to avoid edge cases where we -// just barely miss. We want to do it here, not in every app. A major -// source of trouble is the app's use of the display's ideal refresh time -// (via Display.getRefreshRate()), which could be off of the actual refresh -// by a few percent, with the error multiplied by the number of frames -// between now and when the buffer should be displayed. -// -// If the refresh reported to the app has a phase offset, we shouldn't need -// to tweak anything here. nsecs_t DispSync::expectedPresentTime() { // The HWC doesn't currently have a way to report additional latency. // Assume that whatever we submit now will appear right after the flip. diff --git a/services/surfaceflinger/Scheduler/EventThread.h b/services/surfaceflinger/Scheduler/EventThread.h index d5e33490a5..67e6de9ce2 100644 --- a/services/surfaceflinger/Scheduler/EventThread.h +++ b/services/surfaceflinger/Scheduler/EventThread.h @@ -135,7 +135,7 @@ class EventThread : public android::EventThread, private VSyncSource::Callback { public: using InterceptVSyncsCallback = std::function<void(nsecs_t)>; - // TODO(b/113612090): Once the Scheduler is complete this constructor will become obsolete. + // TODO(b/128863962): Once the Scheduler is complete this constructor will become obsolete. EventThread(VSyncSource*, InterceptVSyncsCallback, const char* threadName); EventThread(std::unique_ptr<VSyncSource>, InterceptVSyncsCallback, const char* threadName); ~EventThread(); @@ -169,7 +169,7 @@ private: using DisplayEventConsumers = std::vector<sp<EventThreadConnection>>; - // TODO(b/113612090): Once the Scheduler is complete this constructor will become obsolete. + // TODO(b/128863962): Once the Scheduler is complete this constructor will become obsolete. EventThread(VSyncSource* src, std::unique_ptr<VSyncSource> uniqueSrc, InterceptVSyncsCallback interceptVSyncsCallback, const char* threadName); @@ -186,10 +186,7 @@ private: // Implements VSyncSource::Callback void onVSyncEvent(nsecs_t timestamp) override; - // Acquires mutex and requests next vsync. - void requestNextVsyncInternal(const sp<EventThreadConnection>& connection) EXCLUDES(mMutex); - - // TODO(b/113612090): Once the Scheduler is complete this pointer will become obsolete. + // TODO(b/128863962): Once the Scheduler is complete this pointer will become obsolete. VSyncSource* mVSyncSource GUARDED_BY(mMutex) = nullptr; std::unique_ptr<VSyncSource> mVSyncSourceUnique GUARDED_BY(mMutex) = nullptr; diff --git a/services/surfaceflinger/Scheduler/MessageQueue.h b/services/surfaceflinger/Scheduler/MessageQueue.h index 56a00c082d..245a8ace88 100644 --- a/services/surfaceflinger/Scheduler/MessageQueue.h +++ b/services/surfaceflinger/Scheduler/MessageQueue.h @@ -85,7 +85,7 @@ public: virtual ~MessageQueue(); virtual void init(const sp<SurfaceFlinger>& flinger) = 0; - // TODO(akrulec): Remove this function once everything is migrated to Scheduler. + // TODO(b/128863962): Remove this function once everything is migrated to Scheduler. virtual void setEventThread(EventThread* events, ResyncCallback resyncCallback) = 0; virtual void setEventConnection(const sp<EventThreadConnection>& connection) = 0; virtual void waitMessage() = 0; diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 08a728a2c3..4c4a29b544 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1245,7 +1245,7 @@ status_t SurfaceFlinger::enableVSyncInjections(bool enable) { auto resyncCallback = mScheduler->makeResyncCallback(std::bind(&SurfaceFlinger::getVsyncPeriod, this)); - // TODO(akrulec): Part of the Injector should be refactored, so that it + // TODO(b/128863962): Part of the Injector should be refactored, so that it // can be passed to Scheduler. if (enable) { ALOGV("VSync Injections enabled"); |