Loading services/surfaceflinger/CompositionEngine/tests/OutputTest.cpp +27 −9 Original line number Diff line number Diff line Loading @@ -4094,7 +4094,11 @@ struct OutputComposeSurfacesTest_HandlesProtectedContent : public OutputComposeS }; TEST_F(OutputComposeSurfacesTest_HandlesProtectedContent, ifNoProtectedContentLayers) { if (FlagManager::getInstance().display_protected()) { mOutput.mState.isProtected = true; } else { mOutput.mState.isSecure = true; } mLayer2.mLayerFEState.hasProtectedContent = false; EXPECT_CALL(mRenderEngine, supportsProtectedContent()).WillRepeatedly(Return(true)); EXPECT_CALL(*mRenderSurface, isProtected).WillOnce(Return(true)); Loading @@ -4108,7 +4112,11 @@ TEST_F(OutputComposeSurfacesTest_HandlesProtectedContent, ifNoProtectedContentLa } TEST_F(OutputComposeSurfacesTest_HandlesProtectedContent, ifNotEnabled) { if (FlagManager::getInstance().display_protected()) { mOutput.mState.isProtected = true; } else { mOutput.mState.isSecure = true; } mLayer2.mLayerFEState.hasProtectedContent = true; EXPECT_CALL(mRenderEngine, supportsProtectedContent()).WillRepeatedly(Return(true)); Loading @@ -4130,7 +4138,11 @@ TEST_F(OutputComposeSurfacesTest_HandlesProtectedContent, ifNotEnabled) { } TEST_F(OutputComposeSurfacesTest_HandlesProtectedContent, ifAlreadyEnabledEverywhere) { if (FlagManager::getInstance().display_protected()) { mOutput.mState.isProtected = true; } else { mOutput.mState.isSecure = true; } mLayer2.mLayerFEState.hasProtectedContent = true; EXPECT_CALL(mRenderEngine, supportsProtectedContent()).WillRepeatedly(Return(true)); EXPECT_CALL(*mRenderSurface, isProtected).WillOnce(Return(true)); Loading @@ -4143,7 +4155,11 @@ TEST_F(OutputComposeSurfacesTest_HandlesProtectedContent, ifAlreadyEnabledEveryw } TEST_F(OutputComposeSurfacesTest_HandlesProtectedContent, ifAlreadyEnabledInRenderSurface) { if (FlagManager::getInstance().display_protected()) { mOutput.mState.isProtected = true; } else { mOutput.mState.isSecure = true; } mLayer2.mLayerFEState.hasProtectedContent = true; EXPECT_CALL(mRenderEngine, supportsProtectedContent()).WillRepeatedly(Return(true)); EXPECT_CALL(*mRenderSurface, isProtected).WillOnce(Return(true)); Loading Loading @@ -4222,6 +4238,7 @@ struct GenerateClientCompositionRequestsTest : public testing::Test { GenerateClientCompositionRequestsTest() { mOutput.mState.needsFiltering = false; mOutput.mState.isProtected = true; mOutput.setDisplayColorProfileForTest( std::unique_ptr<DisplayColorProfile>(mDisplayColorProfile)); Loading @@ -4246,6 +4263,7 @@ struct GenerateClientCompositionRequestsTest_ThreeLayers mOutput.mState.displaySpace.setOrientation(kDisplayOrientation); mOutput.mState.needsFiltering = false; mOutput.mState.isSecure = false; mOutput.mState.isProtected = true; for (size_t i = 0; i < mLayers.size(); i++) { mLayers[i].mOutputLayerState.clearClientTarget = false; Loading Loading @@ -4708,7 +4726,7 @@ TEST_F(GenerateClientCompositionRequestsTest_ThreeLayers, Region(kDisplayFrame), false, /* needs filtering */ false, /* secure */ true, /* supports protected content */ true, /* isProtected */ kDisplayViewport, kDisplayDataspace, true /* realContentIsVisible */, Loading @@ -4721,7 +4739,7 @@ TEST_F(GenerateClientCompositionRequestsTest_ThreeLayers, Region(kDisplayFrame), false, /* needs filtering */ false, /* secure */ true, /* supports protected content */ true, /* isProtected */ kDisplayViewport, kDisplayDataspace, true /* realContentIsVisible */, Loading @@ -4734,7 +4752,7 @@ TEST_F(GenerateClientCompositionRequestsTest_ThreeLayers, Region(kDisplayFrame), false, /* needs filtering */ false, /* secure */ true, /* supports protected content */ true, /* isProtected */ kDisplayViewport, kDisplayDataspace, true /* realContentIsVisible */, Loading Loading @@ -4912,7 +4930,7 @@ TEST_F(GenerateClientCompositionRequestsTest, handlesLandscapeModeSplitScreenReq Region(Rect(0, 0, 1000, 1000)), false, /* needs filtering */ true, /* secure */ true, /* supports protected content */ true, /* isProtected */ kPortraitViewport, kOutputDataspace, true /* realContentIsVisible */, Loading @@ -4931,7 +4949,7 @@ TEST_F(GenerateClientCompositionRequestsTest, handlesLandscapeModeSplitScreenReq Region(Rect(1000, 0, 2000, 1000)), false, /* needs filtering */ true, /* secure */ true, /* supports protected content */ true, /* isProtected */ kPortraitViewport, kOutputDataspace, true /* realContentIsVisible */, Loading Loading
services/surfaceflinger/CompositionEngine/tests/OutputTest.cpp +27 −9 Original line number Diff line number Diff line Loading @@ -4094,7 +4094,11 @@ struct OutputComposeSurfacesTest_HandlesProtectedContent : public OutputComposeS }; TEST_F(OutputComposeSurfacesTest_HandlesProtectedContent, ifNoProtectedContentLayers) { if (FlagManager::getInstance().display_protected()) { mOutput.mState.isProtected = true; } else { mOutput.mState.isSecure = true; } mLayer2.mLayerFEState.hasProtectedContent = false; EXPECT_CALL(mRenderEngine, supportsProtectedContent()).WillRepeatedly(Return(true)); EXPECT_CALL(*mRenderSurface, isProtected).WillOnce(Return(true)); Loading @@ -4108,7 +4112,11 @@ TEST_F(OutputComposeSurfacesTest_HandlesProtectedContent, ifNoProtectedContentLa } TEST_F(OutputComposeSurfacesTest_HandlesProtectedContent, ifNotEnabled) { if (FlagManager::getInstance().display_protected()) { mOutput.mState.isProtected = true; } else { mOutput.mState.isSecure = true; } mLayer2.mLayerFEState.hasProtectedContent = true; EXPECT_CALL(mRenderEngine, supportsProtectedContent()).WillRepeatedly(Return(true)); Loading @@ -4130,7 +4138,11 @@ TEST_F(OutputComposeSurfacesTest_HandlesProtectedContent, ifNotEnabled) { } TEST_F(OutputComposeSurfacesTest_HandlesProtectedContent, ifAlreadyEnabledEverywhere) { if (FlagManager::getInstance().display_protected()) { mOutput.mState.isProtected = true; } else { mOutput.mState.isSecure = true; } mLayer2.mLayerFEState.hasProtectedContent = true; EXPECT_CALL(mRenderEngine, supportsProtectedContent()).WillRepeatedly(Return(true)); EXPECT_CALL(*mRenderSurface, isProtected).WillOnce(Return(true)); Loading @@ -4143,7 +4155,11 @@ TEST_F(OutputComposeSurfacesTest_HandlesProtectedContent, ifAlreadyEnabledEveryw } TEST_F(OutputComposeSurfacesTest_HandlesProtectedContent, ifAlreadyEnabledInRenderSurface) { if (FlagManager::getInstance().display_protected()) { mOutput.mState.isProtected = true; } else { mOutput.mState.isSecure = true; } mLayer2.mLayerFEState.hasProtectedContent = true; EXPECT_CALL(mRenderEngine, supportsProtectedContent()).WillRepeatedly(Return(true)); EXPECT_CALL(*mRenderSurface, isProtected).WillOnce(Return(true)); Loading Loading @@ -4222,6 +4238,7 @@ struct GenerateClientCompositionRequestsTest : public testing::Test { GenerateClientCompositionRequestsTest() { mOutput.mState.needsFiltering = false; mOutput.mState.isProtected = true; mOutput.setDisplayColorProfileForTest( std::unique_ptr<DisplayColorProfile>(mDisplayColorProfile)); Loading @@ -4246,6 +4263,7 @@ struct GenerateClientCompositionRequestsTest_ThreeLayers mOutput.mState.displaySpace.setOrientation(kDisplayOrientation); mOutput.mState.needsFiltering = false; mOutput.mState.isSecure = false; mOutput.mState.isProtected = true; for (size_t i = 0; i < mLayers.size(); i++) { mLayers[i].mOutputLayerState.clearClientTarget = false; Loading Loading @@ -4708,7 +4726,7 @@ TEST_F(GenerateClientCompositionRequestsTest_ThreeLayers, Region(kDisplayFrame), false, /* needs filtering */ false, /* secure */ true, /* supports protected content */ true, /* isProtected */ kDisplayViewport, kDisplayDataspace, true /* realContentIsVisible */, Loading @@ -4721,7 +4739,7 @@ TEST_F(GenerateClientCompositionRequestsTest_ThreeLayers, Region(kDisplayFrame), false, /* needs filtering */ false, /* secure */ true, /* supports protected content */ true, /* isProtected */ kDisplayViewport, kDisplayDataspace, true /* realContentIsVisible */, Loading @@ -4734,7 +4752,7 @@ TEST_F(GenerateClientCompositionRequestsTest_ThreeLayers, Region(kDisplayFrame), false, /* needs filtering */ false, /* secure */ true, /* supports protected content */ true, /* isProtected */ kDisplayViewport, kDisplayDataspace, true /* realContentIsVisible */, Loading Loading @@ -4912,7 +4930,7 @@ TEST_F(GenerateClientCompositionRequestsTest, handlesLandscapeModeSplitScreenReq Region(Rect(0, 0, 1000, 1000)), false, /* needs filtering */ true, /* secure */ true, /* supports protected content */ true, /* isProtected */ kPortraitViewport, kOutputDataspace, true /* realContentIsVisible */, Loading @@ -4931,7 +4949,7 @@ TEST_F(GenerateClientCompositionRequestsTest, handlesLandscapeModeSplitScreenReq Region(Rect(1000, 0, 2000, 1000)), false, /* needs filtering */ true, /* secure */ true, /* supports protected content */ true, /* isProtected */ kPortraitViewport, kOutputDataspace, true /* realContentIsVisible */, Loading