Loading graphics/composer/2.4/IComposerCallback.hal +10 −0 Original line number Diff line number Diff line Loading @@ -42,4 +42,14 @@ interface IComposerCallback extends @2.1::IComposerCallback { * @param updatedTimeline is the new timeline for the vsync period change. */ oneway onVsyncPeriodTimingChanged(Display display, VsyncPeriodChangeTimeline updatedTimeline); /** * Notifies the client that the conditions which previously led to returning * SEAMLESS_NOT_POSSIBLE from setActiveConfigWithConstraints have changed and now seamless may * be possible. Client should retry calling setActiveConfigWithConstraints. * * @param display is a display setActiveConfigWithConstraints previously failed with * SEAMLESS_NOT_POSSIBLE. */ oneway onSeamlessPossible(Display display); }; graphics/composer/2.4/IComposerClient.hal +3 −0 Original line number Diff line number Diff line Loading @@ -185,6 +185,9 @@ interface IComposerClient extends @2.3::IComposerClient { * share the same config group as the current config. * SEAMLESS_NOT_POSSIBLE when seamlessRequired was true but the display cannot achieve * the vsync period change without a noticeable visual artifact. * When the conditions change and it may be possible to change * the vsync period seamlessly, onSeamlessPossible callback * must be called to indicate that caller should retry. * @return timeline is the timeline for the vsync period change. */ setActiveConfigWithConstraints(Display display, Config config, Loading graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerClient.h +6 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,12 @@ class ComposerClientImpl : public V2_3::hal::detail::ComposerClientImpl<Interfac ret.description().c_str()); } void onSeamlessPossible(Display display) override { auto ret = mCallback->onSeamlessPossible(display); ALOGE_IF(!ret.isOk(), "failed to send onSealmessPossible: %s", ret.description().c_str()); } protected: const sp<IComposerCallback> mCallback; V2_1::hal::ComposerResources* const mResources; Loading graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerHal.h +1 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ class ComposerHal : public V2_3::hal::ComposerHal { VsyncPeriodNanos vsyncPeriodNanos) = 0; virtual void onVsyncPeriodTimingChanged(Display display, const VsyncPeriodChangeTimeline& timeline) = 0; virtual void onSeamlessPossible(Display display) = 0; }; virtual void registerEventCallback_2_4(EventCallback_2_4* callback) = 0; Loading graphics/composer/2.4/utils/passthrough/include/composer-passthrough/2.4/HwcHal.h +10 −1 Original line number Diff line number Diff line Loading @@ -61,10 +61,12 @@ class HwcHalImpl : public V2_3::passthrough::detail::HwcHalImpl<Hal> { BaseType2_1::mDispatch.registerCallback( mDevice, HWC2_CALLBACK_VSYNC_2_4, this, reinterpret_cast<hwc2_function_pointer_t>(vsync_2_4_Hook)); BaseType2_1::mDispatch.registerCallback( mDevice, HWC2_CALLBACK_VSYNC_PERIOD_TIMING_CHANGED, this, reinterpret_cast<hwc2_function_pointer_t>(vsyncPeriodTimingChangedHook)); BaseType2_1::mDispatch.registerCallback( mDevice, HWC2_CALLBACK_SEAMLESS_POSSIBLE, this, reinterpret_cast<hwc2_function_pointer_t>(seamlessPossibleHook)); } void unregisterEventCallback_2_4() override { Loading @@ -80,6 +82,8 @@ class HwcHalImpl : public V2_3::passthrough::detail::HwcHalImpl<Hal> { BaseType2_1::mDispatch.registerCallback(mDevice, HWC2_CALLBACK_VSYNC_2_4, this, nullptr); BaseType2_1::mDispatch.registerCallback(mDevice, HWC2_CALLBACK_VSYNC_PERIOD_TIMING_CHANGED, this, nullptr); BaseType2_1::mDispatch.registerCallback(mDevice, HWC2_CALLBACK_SEAMLESS_POSSIBLE, this, nullptr); mEventCallback_2_4 = nullptr; } Loading Loading @@ -272,6 +276,11 @@ class HwcHalImpl : public V2_3::passthrough::detail::HwcHalImpl<Hal> { hal->mEventCallback_2_4->onVsyncPeriodTimingChanged(display, timeline); } static void seamlessPossibleHook(hwc2_callback_data_t callbackData, hwc2_display_t display) { auto hal = static_cast<HwcHalImpl*>(callbackData); hal->mEventCallback_2_4->onSeamlessPossible(display); } private: struct { HWC2_PFN_GET_DISPLAY_CONNECTION_TYPE getDisplayConnectionType; Loading Loading
graphics/composer/2.4/IComposerCallback.hal +10 −0 Original line number Diff line number Diff line Loading @@ -42,4 +42,14 @@ interface IComposerCallback extends @2.1::IComposerCallback { * @param updatedTimeline is the new timeline for the vsync period change. */ oneway onVsyncPeriodTimingChanged(Display display, VsyncPeriodChangeTimeline updatedTimeline); /** * Notifies the client that the conditions which previously led to returning * SEAMLESS_NOT_POSSIBLE from setActiveConfigWithConstraints have changed and now seamless may * be possible. Client should retry calling setActiveConfigWithConstraints. * * @param display is a display setActiveConfigWithConstraints previously failed with * SEAMLESS_NOT_POSSIBLE. */ oneway onSeamlessPossible(Display display); };
graphics/composer/2.4/IComposerClient.hal +3 −0 Original line number Diff line number Diff line Loading @@ -185,6 +185,9 @@ interface IComposerClient extends @2.3::IComposerClient { * share the same config group as the current config. * SEAMLESS_NOT_POSSIBLE when seamlessRequired was true but the display cannot achieve * the vsync period change without a noticeable visual artifact. * When the conditions change and it may be possible to change * the vsync period seamlessly, onSeamlessPossible callback * must be called to indicate that caller should retry. * @return timeline is the timeline for the vsync period change. */ setActiveConfigWithConstraints(Display display, Config config, Loading
graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerClient.h +6 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,12 @@ class ComposerClientImpl : public V2_3::hal::detail::ComposerClientImpl<Interfac ret.description().c_str()); } void onSeamlessPossible(Display display) override { auto ret = mCallback->onSeamlessPossible(display); ALOGE_IF(!ret.isOk(), "failed to send onSealmessPossible: %s", ret.description().c_str()); } protected: const sp<IComposerCallback> mCallback; V2_1::hal::ComposerResources* const mResources; Loading
graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerHal.h +1 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ class ComposerHal : public V2_3::hal::ComposerHal { VsyncPeriodNanos vsyncPeriodNanos) = 0; virtual void onVsyncPeriodTimingChanged(Display display, const VsyncPeriodChangeTimeline& timeline) = 0; virtual void onSeamlessPossible(Display display) = 0; }; virtual void registerEventCallback_2_4(EventCallback_2_4* callback) = 0; Loading
graphics/composer/2.4/utils/passthrough/include/composer-passthrough/2.4/HwcHal.h +10 −1 Original line number Diff line number Diff line Loading @@ -61,10 +61,12 @@ class HwcHalImpl : public V2_3::passthrough::detail::HwcHalImpl<Hal> { BaseType2_1::mDispatch.registerCallback( mDevice, HWC2_CALLBACK_VSYNC_2_4, this, reinterpret_cast<hwc2_function_pointer_t>(vsync_2_4_Hook)); BaseType2_1::mDispatch.registerCallback( mDevice, HWC2_CALLBACK_VSYNC_PERIOD_TIMING_CHANGED, this, reinterpret_cast<hwc2_function_pointer_t>(vsyncPeriodTimingChangedHook)); BaseType2_1::mDispatch.registerCallback( mDevice, HWC2_CALLBACK_SEAMLESS_POSSIBLE, this, reinterpret_cast<hwc2_function_pointer_t>(seamlessPossibleHook)); } void unregisterEventCallback_2_4() override { Loading @@ -80,6 +82,8 @@ class HwcHalImpl : public V2_3::passthrough::detail::HwcHalImpl<Hal> { BaseType2_1::mDispatch.registerCallback(mDevice, HWC2_CALLBACK_VSYNC_2_4, this, nullptr); BaseType2_1::mDispatch.registerCallback(mDevice, HWC2_CALLBACK_VSYNC_PERIOD_TIMING_CHANGED, this, nullptr); BaseType2_1::mDispatch.registerCallback(mDevice, HWC2_CALLBACK_SEAMLESS_POSSIBLE, this, nullptr); mEventCallback_2_4 = nullptr; } Loading Loading @@ -272,6 +276,11 @@ class HwcHalImpl : public V2_3::passthrough::detail::HwcHalImpl<Hal> { hal->mEventCallback_2_4->onVsyncPeriodTimingChanged(display, timeline); } static void seamlessPossibleHook(hwc2_callback_data_t callbackData, hwc2_display_t display) { auto hal = static_cast<HwcHalImpl*>(callbackData); hal->mEventCallback_2_4->onSeamlessPossible(display); } private: struct { HWC2_PFN_GET_DISPLAY_CONNECTION_TYPE getDisplayConnectionType; Loading