PowerManagerService: notify SurfaceFlinger on power hint

To reduce jank on the first buffer, SurfaceFlinger needs to know when there is a touch
event so it can move to performance refresh rate before the first buffer

Test: switch between apps using gesture navigation
Bug: 131906818
Change-Id: I077e6d367d05ed9847d84e7e73ca776a9277b87a
This commit is contained in:
Ady Abraham
2019-05-08 14:56:38 -07:00
parent 9763648d04
commit c0201ca971

View File

@@ -32,6 +32,7 @@
#include <android_runtime/AndroidRuntime.h>
#include <android_runtime/Log.h>
#include <binder/IServiceManager.h>
#include <gui/SurfaceComposerClient.h>
#include <hardware/power.h>
#include <hardware_legacy/power.h>
#include <hidl/ServiceManagement.h>
@@ -147,6 +148,8 @@ static void sendPowerHint(PowerHint hintId, uint32_t data) {
processPowerHalReturn(ret, "powerHint");
}
}
SurfaceComposerClient::notifyPowerHint(static_cast<int32_t>(hintId));
}
void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType) {