Loading services/surfaceflinger/CompositionEngine/tests/CompositionEngineTest.cpp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -504,6 +504,12 @@ struct CompositionEnginePostCompositionTest : public CompositionEngineTest { }; }; TEST_F(CompositionEnginePostCompositionTest, postCompositionReleasesAllFences) { TEST_F(CompositionEnginePostCompositionTest, postCompositionReleasesAllFences) { if (FlagManager::getInstance().force_slower_follower_gpu_composition()) { // No point in sending a real fence since Fence::merge() will clobber it to a NO_FENCE // anyways. EXPECT_CALL(*mLayer3FE, getAndClearLastClientTargetAcquireFence()) .WillOnce(Return(Fence::NO_FENCE)); } EXPECT_CALL(*mLayer1FE, getReleaseFencePromiseStatus) EXPECT_CALL(*mLayer1FE, getReleaseFencePromiseStatus) .WillOnce(Return(LayerFE::ReleaseFencePromiseStatus::FULFILLED)); .WillOnce(Return(LayerFE::ReleaseFencePromiseStatus::FULFILLED)); EXPECT_CALL(*mLayer2FE, getReleaseFencePromiseStatus) EXPECT_CALL(*mLayer2FE, getReleaseFencePromiseStatus) Loading services/surfaceflinger/CompositionEngine/tests/OutputTest.cpp +7 −0 Original line number Original line Diff line number Diff line Loading @@ -3409,6 +3409,13 @@ TEST_F(OutputPostFramebufferTest, ifEnabledMustFlipThenPresentThenSendPresentCom } } TEST_F(OutputPostFramebufferTest, releaseFencesAreSetInLayerFE) { TEST_F(OutputPostFramebufferTest, releaseFencesAreSetInLayerFE) { // Fence::merge() always happens with this flag on, which returns a different Fence instance // even if one of the fence is a NO_FENCE. The checks in this test is for the specific instance. // Therefore, disable the flag and re-write it with a looser check when we clean up the flag. SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags:: force_slower_follower_gpu_composition, false); // Simulate getting release fences from each layer, and ensure they are passed to the // Simulate getting release fences from each layer, and ensure they are passed to the // front-end layer interface for each layer correctly. // front-end layer interface for each layer correctly. mOutput.mState.isEnabled = true; mOutput.mState.isEnabled = true; Loading Loading
services/surfaceflinger/CompositionEngine/tests/CompositionEngineTest.cpp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -504,6 +504,12 @@ struct CompositionEnginePostCompositionTest : public CompositionEngineTest { }; }; TEST_F(CompositionEnginePostCompositionTest, postCompositionReleasesAllFences) { TEST_F(CompositionEnginePostCompositionTest, postCompositionReleasesAllFences) { if (FlagManager::getInstance().force_slower_follower_gpu_composition()) { // No point in sending a real fence since Fence::merge() will clobber it to a NO_FENCE // anyways. EXPECT_CALL(*mLayer3FE, getAndClearLastClientTargetAcquireFence()) .WillOnce(Return(Fence::NO_FENCE)); } EXPECT_CALL(*mLayer1FE, getReleaseFencePromiseStatus) EXPECT_CALL(*mLayer1FE, getReleaseFencePromiseStatus) .WillOnce(Return(LayerFE::ReleaseFencePromiseStatus::FULFILLED)); .WillOnce(Return(LayerFE::ReleaseFencePromiseStatus::FULFILLED)); EXPECT_CALL(*mLayer2FE, getReleaseFencePromiseStatus) EXPECT_CALL(*mLayer2FE, getReleaseFencePromiseStatus) Loading
services/surfaceflinger/CompositionEngine/tests/OutputTest.cpp +7 −0 Original line number Original line Diff line number Diff line Loading @@ -3409,6 +3409,13 @@ TEST_F(OutputPostFramebufferTest, ifEnabledMustFlipThenPresentThenSendPresentCom } } TEST_F(OutputPostFramebufferTest, releaseFencesAreSetInLayerFE) { TEST_F(OutputPostFramebufferTest, releaseFencesAreSetInLayerFE) { // Fence::merge() always happens with this flag on, which returns a different Fence instance // even if one of the fence is a NO_FENCE. The checks in this test is for the specific instance. // Therefore, disable the flag and re-write it with a looser check when we clean up the flag. SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags:: force_slower_follower_gpu_composition, false); // Simulate getting release fences from each layer, and ensure they are passed to the // Simulate getting release fences from each layer, and ensure they are passed to the // front-end layer interface for each layer correctly. // front-end layer interface for each layer correctly. mOutput.mState.isEnabled = true; mOutput.mState.isEnabled = true; Loading