diff options
author | Midas Chien <midaschieh@google.com> | 2022-04-11 15:21:43 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2022-04-11 15:21:43 +0000 |
commit | 21c4dc9858d0aea8ad4d694a36b425cfac4cfeab (patch) | |
tree | de2092d3ff7aaa3e84411510e3b1a470cc58dc1a /hwc3 | |
parent | c04f1df25442d6caa72231a9cd784ce5fd8c99d1 (diff) | |
parent | d767263ad9fb5c93da0864c4311b0ec8a8ab5a08 (diff) |
Merge "hwc3: implement VsyncIdle callback for HWC3" into tm-dev
Diffstat (limited to 'hwc3')
-rw-r--r-- | hwc3/impl/HalImpl.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/hwc3/impl/HalImpl.cpp b/hwc3/impl/HalImpl.cpp index 0114d2d..c3011f9 100644 --- a/hwc3/impl/HalImpl.cpp +++ b/hwc3/impl/HalImpl.cpp @@ -14,15 +14,17 @@ * limitations under the License. */ +#include "HalImpl.h" + +#include <aidl/android/hardware/graphics/composer3/IComposerCallback.h> #include <android-base/logging.h> #include <hardware/hwcomposer2.h> -#include "ExynosDeviceModule.h" #include "ExynosDevice.h" +#include "ExynosDeviceModule.h" #include "ExynosDisplay.h" #include "ExynosHWCService.h" #include "ExynosLayer.h" -#include "HalImpl.h" #include "TranslateHwcAidl.h" #include "Util.h" @@ -187,6 +189,10 @@ void HalImpl::registerEventCallback(EventCallback* callback) { reinterpret_cast<hwc2_function_pointer_t>(hook::vsyncPeriodTimingChanged)); mDevice->registerCallback(HWC2_CALLBACK_SEAMLESS_POSSIBLE, this, reinterpret_cast<hwc2_function_pointer_t>(hook::seamlessPossible)); + + // register HWC3 Callback + mDevice->registerHwc3Callback(IComposerCallback::TRANSACTION_onVsyncIdle, this, + reinterpret_cast<hwc2_function_pointer_t>(hook::vsyncIdle)); } void HalImpl::unregisterEventCallback() { @@ -196,6 +202,9 @@ void HalImpl::unregisterEventCallback() { mDevice->registerCallback(HWC2_CALLBACK_VSYNC_PERIOD_TIMING_CHANGED, this, nullptr); mDevice->registerCallback(HWC2_CALLBACK_SEAMLESS_POSSIBLE, this, nullptr); + // unregister HWC3 Callback + mDevice->registerHwc3Callback(IComposerCallback::TRANSACTION_onVsyncIdle, this, nullptr); + mEventCallback = nullptr; } |