diff options
author | Midas Chien <midaschieh@google.com> | 2022-01-14 15:40:55 +0800 |
---|---|---|
committer | Midas Chien <midaschieh@google.com> | 2022-01-20 15:23:24 +0800 |
commit | 31a49697eddaa89388cc223d76021a02490c22f6 (patch) | |
tree | 0deaf8cf6b1b834dfc30595a9bcd6f5620cc7b4f /hwc3/ComposerClient.cpp | |
parent | ca14fd522f8cf02766bee9180b40069d0ad16adc (diff) |
hwc3: add setIdleTimerEnabled and vsyncIdle callback
Bug: 194068871
Bug: 198808492
Test: build, vts
Change-Id: Ia55c4069246d3aac08b8f0ec5653bbdc684db42c
Diffstat (limited to 'hwc3/ComposerClient.cpp')
-rw-r--r-- | hwc3/ComposerClient.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hwc3/ComposerClient.cpp b/hwc3/ComposerClient.cpp index b885106..6b95e9e 100644 --- a/hwc3/ComposerClient.cpp +++ b/hwc3/ComposerClient.cpp @@ -376,6 +376,12 @@ ndk::ScopedAStatus ComposerClient::setVsyncEnabled(int64_t display, bool enabled return TO_BINDER_STATUS(err); } +ndk::ScopedAStatus ComposerClient::setIdleTimerEnabled(int64_t display, int32_t timeout) { + DEBUG_FUNC(); + auto err = mHal->setIdleTimerEnabled(display, timeout); + return TO_BINDER_STATUS(err); +} + void ComposerClient::HalEventCallback::onHotplug(int64_t display, bool connected) { DEBUG_FUNC(); if (connected) { @@ -425,6 +431,14 @@ void ComposerClient::HalEventCallback::onVsyncPeriodTimingChanged( } } +void ComposerClient::HalEventCallback::onVsyncIdle(int64_t display) { + DEBUG_FUNC(); + auto ret = mCallback->onVsyncIdle(display); + if (!ret.isOk()) { + LOG(ERROR) << "failed to send onVsyncIdle:" << ret.getDescription(); + } +} + void ComposerClient::HalEventCallback::onSeamlessPossible(int64_t display) { DEBUG_FUNC(); auto ret = mCallback->onSeamlessPossible(display); |