diff options
-rw-r--r-- | hwc3/ComposerClient.cpp | 11 | ||||
-rw-r--r-- | hwc3/ComposerClient.h | 3 | ||||
-rw-r--r-- | hwc3/impl/HalImpl.cpp | 6 | ||||
-rw-r--r-- | hwc3/impl/HalImpl.h | 2 | ||||
-rw-r--r-- | hwc3/include/IComposerHal.h | 3 |
5 files changed, 25 insertions, 0 deletions
diff --git a/hwc3/ComposerClient.cpp b/hwc3/ComposerClient.cpp index 80231ef..ff65c04 100644 --- a/hwc3/ComposerClient.cpp +++ b/hwc3/ComposerClient.cpp @@ -432,6 +432,17 @@ 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); +} + +void ComposerClient::HalEventCallback::onRefreshRateChangedDebug( + const RefreshRateChangedDebugData&) { + // TODO(b/267825022) Add implementation for the HAL +} + void ComposerClient::HalEventCallback::onHotplug(int64_t display, bool connected) { DEBUG_DISPLAY_FUNC(display); if (connected) { diff --git a/hwc3/ComposerClient.h b/hwc3/ComposerClient.h index 89763f8..f8bfa4c 100644 --- a/hwc3/ComposerClient.h +++ b/hwc3/ComposerClient.h @@ -49,6 +49,7 @@ public: const VsyncPeriodChangeTimeline& timeline) override; void onVsyncIdle(int64_t display) override; void onSeamlessPossible(int64_t display) override; + void onRefreshRateChangedDebug(const RefreshRateChangedDebugData& data) override; private: void cleanDisplayResources(int64_t display); @@ -130,6 +131,8 @@ public: const ndk::ScopedFileDescriptor& releaseFence) override; ndk::ScopedAStatus setVsyncEnabled(int64_t display, bool enabled) override; ndk::ScopedAStatus setIdleTimerEnabled(int64_t display, int32_t timeout) override; + ndk::ScopedAStatus setRefreshRateChangedCallbackDebugEnabled(int64_t /* display */, + bool /* enabled */) override; protected: ::ndk::SpAIBinder createBinder() override; diff --git a/hwc3/impl/HalImpl.cpp b/hwc3/impl/HalImpl.cpp index acae3d2..92e120a 100644 --- a/hwc3/impl/HalImpl.cpp +++ b/hwc3/impl/HalImpl.cpp @@ -1064,4 +1064,10 @@ int32_t HalImpl::getDisplayMultiThreadedPresentSupport(const int64_t& display, b return halDisplay->getDisplayMultiThreadedPresentSupport(outSupport); } +int32_t HalImpl::setRefreshRateChangedCallbackDebugEnabled(int64_t /* display*/, + bool /* enabled */) { + // TODO(b/267825022) Add implementation for the HAL + return EX_UNSUPPORTED_OPERATION; +} + } // namespace aidl::android::hardware::graphics::composer3::impl diff --git a/hwc3/impl/HalImpl.h b/hwc3/impl/HalImpl.h index dce48c0..372e190 100644 --- a/hwc3/impl/HalImpl.h +++ b/hwc3/impl/HalImpl.h @@ -158,6 +158,8 @@ class HalImpl : public IComposerHal { const std::optional<ClockMonotonicTimestamp> expectedPresentTime) override; EventCallback* getEventCallback() { return mEventCallback; } + int32_t setRefreshRateChangedCallbackDebugEnabled(int64_t /* display */, + bool /* enabled */) override; private: void initCaps(); diff --git a/hwc3/include/IComposerHal.h b/hwc3/include/IComposerHal.h index fc6484d..898f254 100644 --- a/hwc3/include/IComposerHal.h +++ b/hwc3/include/IComposerHal.h @@ -70,6 +70,7 @@ #include <aidl/android/hardware/graphics/composer3/PresentFence.h> #include <aidl/android/hardware/graphics/composer3/PresentOrValidate.h> #include <aidl/android/hardware/graphics/composer3/ReadbackBufferAttributes.h> +#include <aidl/android/hardware/graphics/composer3/RefreshRateChangedDebugData.h> #include <aidl/android/hardware/graphics/composer3/ReleaseFences.h> #include <aidl/android/hardware/graphics/composer3/RenderIntent.h> #include <aidl/android/hardware/graphics/composer3/VirtualDisplay.h> @@ -105,6 +106,7 @@ class IComposerHal { const VsyncPeriodChangeTimeline& timeline) = 0; virtual void onVsyncIdle(int64_t display) = 0; virtual void onSeamlessPossible(int64_t display) = 0; + virtual void onRefreshRateChangedDebug(const RefreshRateChangedDebugData& data) = 0; }; virtual void registerEventCallback(EventCallback* callback) = 0; virtual void unregisterEventCallback() = 0; @@ -227,6 +229,7 @@ class IComposerHal { virtual int32_t setLayerBlockingRegion( int64_t display, int64_t layer, const std::vector<std::optional<common::Rect>>& blockingRegion) = 0; + virtual int32_t setRefreshRateChangedCallbackDebugEnabled(int64_t display, bool enabled) = 0; }; } // namespace aidl::android::hardware::graphics::composer3::detail |