diff options
author | Presubmit Automerger Backend <android-build-presubmit-automerger-backend@system.gserviceaccount.com> | 2022-04-07 21:26:43 +0000 |
---|---|---|
committer | Presubmit Automerger Backend <android-build-presubmit-automerger-backend@system.gserviceaccount.com> | 2022-04-07 21:26:43 +0000 |
commit | 32d3584cd4ded568982636ee38dd7e6b5aa2dc7c (patch) | |
tree | 37a0edd8f53962bc73562773d3945aff0f0b772d /hwc3/impl/HalImpl.cpp | |
parent | 96d9633034b29832520ad6672d5bb0344c427e36 (diff) | |
parent | db3442376258c4eb2095f3a54793255b93ef1c7c (diff) |
[automerge] hwc3: implement VsyncIdle callback for HWC3 2p: d767263ad9 2p: db34423762
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/graphics/common/+/17190263
Bug: 194068871
Change-Id: I5ea885f0b2a27b7657dbae034e4c74aeedfacb28
Diffstat (limited to 'hwc3/impl/HalImpl.cpp')
-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 1029fe8..38c8b02 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" @@ -185,6 +187,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() { @@ -194,6 +200,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; } |