diff options
author | Wiwit Rifa'i <wiwitrifai@google.com> | 2023-03-06 07:40:41 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2023-03-06 07:40:41 +0000 |
commit | 0584de6c22e58abd9420105609ae103710a84a5b (patch) | |
tree | 067d416fa3984468c8d9d4bba1c94dc35430dbc2 /hwc3/ComposerClient.cpp | |
parent | 896de26fb1747138175169af681d92d93783113a (diff) | |
parent | 1baa6346adfe4d8ede6f2ad6cc8687058bfeab70 (diff) |
Merge changes from topic "hwc-rri-callback-impl" into udc-dev
* changes:
hwc3: add debug to trigger refresh rate indicator update
hwc3: add support for refresh rate indicator callback
Diffstat (limited to 'hwc3/ComposerClient.cpp')
-rw-r--r-- | hwc3/ComposerClient.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/hwc3/ComposerClient.cpp b/hwc3/ComposerClient.cpp index 7f73d0f..edd8771 100644 --- a/hwc3/ComposerClient.cpp +++ b/hwc3/ComposerClient.cpp @@ -433,15 +433,20 @@ ndk::ScopedAStatus ComposerClient::setIdleTimerEnabled(int64_t display, int32_t return TO_BINDER_STATUS(err); } -ndk::ScopedAStatus ComposerClient::setRefreshRateChangedCallbackDebugEnabled(int64_t /* display */, - bool /* enabled */) { - // TODO(b/267825022) Add implementation for the HAL and pass appropriate binder status - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); +ndk::ScopedAStatus ComposerClient::setRefreshRateChangedCallbackDebugEnabled(int64_t display, + bool enabled) { + DEBUG_DISPLAY_FUNC(display); + auto err = mHal->setRefreshRateChangedCallbackDebugEnabled(display, enabled); + return TO_BINDER_STATUS(err); } void ComposerClient::HalEventCallback::onRefreshRateChangedDebug( - const RefreshRateChangedDebugData&) { - // TODO(b/267825022) Add implementation for the HAL + const RefreshRateChangedDebugData& data) { + DEBUG_DISPLAY_FUNC(data.display); + auto ret = mCallback->onRefreshRateChangedDebug(data); + if (!ret.isOk()) { + LOG(ERROR) << "failed to send onRefreshRateChangedDebug:" << ret.getDescription(); + } } void ComposerClient::HalEventCallback::onHotplug(int64_t display, bool connected) { |