Loading services/surfaceflinger/CompositionEngine/include/compositionengine/CompositionRefreshArgs.h +3 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,9 @@ struct CompositionRefreshArgs { // The expected time for the next present nsecs_t expectedPresentTime{0}; // The frameInterval for the next present Fps frameInterval{}; // If set, a frame has been scheduled for that time. std::optional<std::chrono::steady_clock::time_point> scheduledFrameTime; Loading services/surfaceflinger/CompositionEngine/include/compositionengine/impl/OutputCompositionState.h +3 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,9 @@ struct OutputCompositionState { // The expected time for the next present nsecs_t expectedPresentTime{0}; // The frameInterval for the next present Fps frameInterval{}; // Current display brightness float displayBrightnessNits{-1.f}; Loading services/surfaceflinger/CompositionEngine/src/Display.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -255,10 +255,10 @@ bool Display::chooseCompositionStrategy( const TimePoint hwcValidateStartTime = TimePoint::now(); if (status_t result = hwc.getDeviceCompositionChanges(*halDisplayId, requiresClientComposition, if (status_t result = hwc.getDeviceCompositionChanges(*halDisplayId, requiresClientComposition, getState().earliestPresentTime, getState().expectedPresentTime, outChanges); getState().expectedPresentTime, getState().frameInterval, outChanges); result != NO_ERROR) { ALOGE("chooseCompositionStrategy failed for %s: %d (%s)", getName().c_str(), result, strerror(-result)); Loading services/surfaceflinger/CompositionEngine/src/Output.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -836,6 +836,7 @@ void Output::writeCompositionState(const compositionengine::CompositionRefreshAr editState().earliestPresentTime = refreshArgs.earliestPresentTime; editState().expectedPresentTime = refreshArgs.expectedPresentTime; editState().frameInterval = refreshArgs.frameInterval; editState().powerCallback = refreshArgs.powerCallback; compositionengine::OutputLayer* peekThroughLayer = nullptr; Loading services/surfaceflinger/CompositionEngine/tests/DisplayTest.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -582,7 +582,7 @@ TEST_F(DisplayChooseCompositionStrategyTest, takesEarlyOutIfGpuDisplay) { TEST_F(DisplayChooseCompositionStrategyTest, takesEarlyOutOnHwcError) { EXPECT_CALL(*mDisplay, anyLayersRequireClientComposition()).WillOnce(Return(false)); EXPECT_CALL(mHwComposer, getDeviceCompositionChanges(HalDisplayId(DEFAULT_DISPLAY_ID), false, _, _, _)) getDeviceCompositionChanges(HalDisplayId(DEFAULT_DISPLAY_ID), false, _, _, _, _)) .WillOnce(Return(INVALID_OPERATION)); chooseCompositionStrategy(mDisplay.get()); Loading @@ -606,8 +606,8 @@ TEST_F(DisplayChooseCompositionStrategyTest, normalOperation) { .WillOnce(Return(false)); EXPECT_CALL(mHwComposer, getDeviceCompositionChanges(HalDisplayId(DEFAULT_DISPLAY_ID), true, _, _, _)) .WillOnce(testing::DoAll(testing::SetArgPointee<4>(mDeviceRequestedChanges), getDeviceCompositionChanges(HalDisplayId(DEFAULT_DISPLAY_ID), true, _, _, _, _)) .WillOnce(testing::DoAll(testing::SetArgPointee<5>(mDeviceRequestedChanges), Return(NO_ERROR))); EXPECT_CALL(*mDisplay, applyChangedTypesToLayers(mDeviceRequestedChanges.changedTypes)) .Times(1); Loading Loading @@ -659,8 +659,8 @@ TEST_F(DisplayChooseCompositionStrategyTest, normalOperationWithChanges) { .WillOnce(Return(false)); EXPECT_CALL(mHwComposer, getDeviceCompositionChanges(HalDisplayId(DEFAULT_DISPLAY_ID), true, _, _, _)) .WillOnce(DoAll(SetArgPointee<4>(mDeviceRequestedChanges), Return(NO_ERROR))); getDeviceCompositionChanges(HalDisplayId(DEFAULT_DISPLAY_ID), true, _, _, _, _)) .WillOnce(DoAll(SetArgPointee<5>(mDeviceRequestedChanges), Return(NO_ERROR))); EXPECT_CALL(*mDisplay, applyChangedTypesToLayers(mDeviceRequestedChanges.changedTypes)) .Times(1); EXPECT_CALL(*mDisplay, applyDisplayRequests(mDeviceRequestedChanges.displayRequests)).Times(1); Loading Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/CompositionRefreshArgs.h +3 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,9 @@ struct CompositionRefreshArgs { // The expected time for the next present nsecs_t expectedPresentTime{0}; // The frameInterval for the next present Fps frameInterval{}; // If set, a frame has been scheduled for that time. std::optional<std::chrono::steady_clock::time_point> scheduledFrameTime; Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/impl/OutputCompositionState.h +3 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,9 @@ struct OutputCompositionState { // The expected time for the next present nsecs_t expectedPresentTime{0}; // The frameInterval for the next present Fps frameInterval{}; // Current display brightness float displayBrightnessNits{-1.f}; Loading
services/surfaceflinger/CompositionEngine/src/Display.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -255,10 +255,10 @@ bool Display::chooseCompositionStrategy( const TimePoint hwcValidateStartTime = TimePoint::now(); if (status_t result = hwc.getDeviceCompositionChanges(*halDisplayId, requiresClientComposition, if (status_t result = hwc.getDeviceCompositionChanges(*halDisplayId, requiresClientComposition, getState().earliestPresentTime, getState().expectedPresentTime, outChanges); getState().expectedPresentTime, getState().frameInterval, outChanges); result != NO_ERROR) { ALOGE("chooseCompositionStrategy failed for %s: %d (%s)", getName().c_str(), result, strerror(-result)); Loading
services/surfaceflinger/CompositionEngine/src/Output.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -836,6 +836,7 @@ void Output::writeCompositionState(const compositionengine::CompositionRefreshAr editState().earliestPresentTime = refreshArgs.earliestPresentTime; editState().expectedPresentTime = refreshArgs.expectedPresentTime; editState().frameInterval = refreshArgs.frameInterval; editState().powerCallback = refreshArgs.powerCallback; compositionengine::OutputLayer* peekThroughLayer = nullptr; Loading
services/surfaceflinger/CompositionEngine/tests/DisplayTest.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -582,7 +582,7 @@ TEST_F(DisplayChooseCompositionStrategyTest, takesEarlyOutIfGpuDisplay) { TEST_F(DisplayChooseCompositionStrategyTest, takesEarlyOutOnHwcError) { EXPECT_CALL(*mDisplay, anyLayersRequireClientComposition()).WillOnce(Return(false)); EXPECT_CALL(mHwComposer, getDeviceCompositionChanges(HalDisplayId(DEFAULT_DISPLAY_ID), false, _, _, _)) getDeviceCompositionChanges(HalDisplayId(DEFAULT_DISPLAY_ID), false, _, _, _, _)) .WillOnce(Return(INVALID_OPERATION)); chooseCompositionStrategy(mDisplay.get()); Loading @@ -606,8 +606,8 @@ TEST_F(DisplayChooseCompositionStrategyTest, normalOperation) { .WillOnce(Return(false)); EXPECT_CALL(mHwComposer, getDeviceCompositionChanges(HalDisplayId(DEFAULT_DISPLAY_ID), true, _, _, _)) .WillOnce(testing::DoAll(testing::SetArgPointee<4>(mDeviceRequestedChanges), getDeviceCompositionChanges(HalDisplayId(DEFAULT_DISPLAY_ID), true, _, _, _, _)) .WillOnce(testing::DoAll(testing::SetArgPointee<5>(mDeviceRequestedChanges), Return(NO_ERROR))); EXPECT_CALL(*mDisplay, applyChangedTypesToLayers(mDeviceRequestedChanges.changedTypes)) .Times(1); Loading Loading @@ -659,8 +659,8 @@ TEST_F(DisplayChooseCompositionStrategyTest, normalOperationWithChanges) { .WillOnce(Return(false)); EXPECT_CALL(mHwComposer, getDeviceCompositionChanges(HalDisplayId(DEFAULT_DISPLAY_ID), true, _, _, _)) .WillOnce(DoAll(SetArgPointee<4>(mDeviceRequestedChanges), Return(NO_ERROR))); getDeviceCompositionChanges(HalDisplayId(DEFAULT_DISPLAY_ID), true, _, _, _, _)) .WillOnce(DoAll(SetArgPointee<5>(mDeviceRequestedChanges), Return(NO_ERROR))); EXPECT_CALL(*mDisplay, applyChangedTypesToLayers(mDeviceRequestedChanges.changedTypes)) .Times(1); EXPECT_CALL(*mDisplay, applyDisplayRequests(mDeviceRequestedChanges.displayRequests)).Times(1); Loading