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
diff --git a/libs/gui/IDisplayEventConnection.cpp b/libs/gui/IDisplayEventConnection.cpp
index aa74bfd..c0e246f 100644
--- a/libs/gui/IDisplayEventConnection.cpp
+++ b/libs/gui/IDisplayEventConnection.cpp
@@ -26,8 +26,7 @@
STEAL_RECEIVE_CHANNEL = IBinder::FIRST_CALL_TRANSACTION,
SET_VSYNC_RATE,
REQUEST_NEXT_VSYNC,
- REQUEST_LATEST_CONFIG,
- LAST = REQUEST_LATEST_CONFIG,
+ LAST = REQUEST_NEXT_VSYNC,
};
} // Anonymous namespace
@@ -54,11 +53,6 @@
callRemoteAsync<decltype(&IDisplayEventConnection::requestNextVsync)>(
Tag::REQUEST_NEXT_VSYNC);
}
-
- void requestLatestConfig() override {
- callRemoteAsync<decltype(&IDisplayEventConnection::requestLatestConfig)>(
- Tag::REQUEST_LATEST_CONFIG);
- }
};
// Out-of-line virtual method definition to trigger vtable emission in this translation unit (see
@@ -80,8 +74,6 @@
return callLocal(data, reply, &IDisplayEventConnection::setVsyncRate);
case Tag::REQUEST_NEXT_VSYNC:
return callLocalAsync(data, reply, &IDisplayEventConnection::requestNextVsync);
- case Tag::REQUEST_LATEST_CONFIG:
- return callLocalAsync(data, reply, &IDisplayEventConnection::requestLatestConfig);
}
}