diff options
| author | 2020-08-05 12:50:03 -0700 | |
|---|---|---|
| committer | 2020-09-23 20:11:23 +0000 | |
| commit | e88f23af664f9c03f21d80b8f26022b7e70b2f05 (patch) | |
| tree | 9f0efe833b699fe2c4af1cfc32344c599952797f /libs/gui/DisplayEventReceiver.cpp | |
| parent | d4c28086bcbaffde7dd5a662ab9d5ab068097a84 (diff) | |
Fix refresh rate callback fan-out for choreographer
* AChoreographer receives refresh rates from DisplayManager
already, so there's no need to default-enable them - AChoreographer only
needs to pump an event with the latest refresh rate to wake up looper. This
also ensures that AChoreographer's callbacks are entirely in-sync with
DisplayManager since there's no raciness.
* Instead of re-requesting a config change from SF, instead inject it in
AChoreographer correctly to save on binder.
Bug: 154874011
Bug: 158680912
Bug: 161406626
Bug: 168776852
Test: while [ true ]; do adb shell service call SurfaceFlinger 1035 i32
1; adb shell service call SurfaceFlinger 1035 i32 0; and repeatedly
rotate the home screen with auto-rotate off.
Change-Id: I66abc2e28e60f06987ce3a54be294c94b77524fc
Merged-In: I66abc2e28e60f06987ce3a54be294c94b77524fc
Diffstat (limited to 'libs/gui/DisplayEventReceiver.cpp')
| -rw-r--r-- | libs/gui/DisplayEventReceiver.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libs/gui/DisplayEventReceiver.cpp b/libs/gui/DisplayEventReceiver.cpp index 1fed509003..f2b0962eb7 100644 --- a/libs/gui/DisplayEventReceiver.cpp +++ b/libs/gui/DisplayEventReceiver.cpp @@ -79,14 +79,6 @@ status_t DisplayEventReceiver::requestNextVsync() { return NO_INIT; } -status_t DisplayEventReceiver::requestLatestConfig() { - if (mEventConnection != nullptr) { - mEventConnection->requestLatestConfig(); - return NO_ERROR; - } - return NO_INIT; -} - ssize_t DisplayEventReceiver::getEvents(DisplayEventReceiver::Event* events, size_t count) { return DisplayEventReceiver::getEvents(mDataChannel.get(), events, count); @@ -98,6 +90,10 @@ ssize_t DisplayEventReceiver::getEvents(gui::BitTube* dataChannel, return gui::BitTube::recvObjects(dataChannel, events, count); } +ssize_t DisplayEventReceiver::sendEvents(Event const* events, size_t count) { + return DisplayEventReceiver::sendEvents(mDataChannel.get(), events, count); +} + ssize_t DisplayEventReceiver::sendEvents(gui::BitTube* dataChannel, Event const* events, size_t count) { |