Loading services/surfaceflinger/common/FlagManager.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -108,7 +108,6 @@ void FlagManager::dump(std::string& result) const { DUMP_SERVER_FLAG(use_skia_tracing); /// Trunk stable server flags /// DUMP_SERVER_FLAG(late_boot_misc2); DUMP_SERVER_FLAG(dont_skip_on_early); DUMP_SERVER_FLAG(refresh_rate_overlay_on_external_display); Loading Loading @@ -212,7 +211,6 @@ FLAG_MANAGER_READ_ONLY_FLAG(renderable_buffer_usage, "") FLAG_MANAGER_READ_ONLY_FLAG(restore_blur_step, "debug.renderengine.restore_blur_step") /// Trunk stable server flags /// FLAG_MANAGER_SERVER_FLAG(late_boot_misc2, "") FLAG_MANAGER_SERVER_FLAG(refresh_rate_overlay_on_external_display, "") /// Exceptions /// Loading services/surfaceflinger/common/include/common/FlagManager.h +0 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ public: bool use_skia_tracing() const; /// Trunk stable server flags /// bool late_boot_misc2() const; bool dont_skip_on_early() const; bool refresh_rate_overlay_on_external_display() const; Loading services/surfaceflinger/surfaceflinger_flags.aconfig +0 −7 Original line number Diff line number Diff line Loading @@ -17,13 +17,6 @@ flag { is_fixed_read_only: true } flag{ name: "late_boot_misc2" namespace: "core_graphics" description: "This flag controls minor miscellaneous SurfaceFlinger changes. Cannot be read before boot finished!" bug: "297389311" } flag { name: "vrr_config" namespace: "core_graphics" Loading services/surfaceflinger/tests/unittests/FlagManagerTest.cpp +19 −20 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ namespace android { using namespace com::android::graphics::surfaceflinger; using testing::Return; class TestableFlagManager : public FlagManager { Loading Loading @@ -86,26 +87,26 @@ TEST_F(FlagManagerTest, legacyReturnsValue) { TEST_F(FlagManagerTest, creashesIfQueriedBeforeBoot) { mFlagManager.markBootIncomplete(); EXPECT_DEATH(FlagManager::getInstance().late_boot_misc2(), ""); EXPECT_DEATH(FlagManager::getInstance() .refresh_rate_overlay_on_external_display(), ""); } TEST_F(FlagManagerTest, returnsOverrideTrue) { mFlagManager.markBootCompleted(); SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::late_boot_misc2, false); SET_FLAG_FOR_TEST(flags::refresh_rate_overlay_on_external_display, false); // This is stored in a static variable, so this test depends on the fact // that this flag has not been read in this process. EXPECT_CALL(mFlagManager, getBoolProperty).WillOnce(Return(true)); EXPECT_TRUE(mFlagManager.late_boot_misc2()); EXPECT_TRUE(mFlagManager.refresh_rate_overlay_on_external_display()); // Further calls will not result in further calls to getBoolProperty. EXPECT_TRUE(mFlagManager.late_boot_misc2()); EXPECT_TRUE(mFlagManager.refresh_rate_overlay_on_external_display()); } TEST_F(FlagManagerTest, returnsOverrideReadonly) { SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::add_sf_skipped_frames_to_trace, false); SET_FLAG_FOR_TEST(flags::add_sf_skipped_frames_to_trace, false); // This is stored in a static variable, so this test depends on the fact // that this flag has not been read in this process. Loading @@ -116,9 +117,7 @@ TEST_F(FlagManagerTest, returnsOverrideReadonly) { TEST_F(FlagManagerTest, returnsOverrideFalse) { mFlagManager.markBootCompleted(); SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags:: refresh_rate_overlay_on_external_display, true); SET_FLAG_FOR_TEST(flags::refresh_rate_overlay_on_external_display, true); // This is stored in a static variable, so this test depends on the fact // that this flag has not been read in this process. Loading @@ -129,7 +128,7 @@ TEST_F(FlagManagerTest, returnsOverrideFalse) { TEST_F(FlagManagerTest, ignoresOverrideInUnitTestMode) { mFlagManager.setUnitTestMode(); SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::multithreaded_present, true); SET_FLAG_FOR_TEST(flags::multithreaded_present, true); // If this has not been called in this process, it will be called. // Regardless, the result is ignored. Loading @@ -144,13 +143,13 @@ TEST_F(FlagManagerTest, returnsValue) { EXPECT_CALL(mFlagManager, getBoolProperty).WillRepeatedly(Return(std::nullopt)); { SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::late_boot_misc2, true); EXPECT_EQ(true, mFlagManager.late_boot_misc2()); SET_FLAG_FOR_TEST(flags::refresh_rate_overlay_on_external_display, true); EXPECT_EQ(true, mFlagManager.refresh_rate_overlay_on_external_display()); } { SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::late_boot_misc2, false); EXPECT_EQ(false, mFlagManager.late_boot_misc2()); SET_FLAG_FOR_TEST(flags::refresh_rate_overlay_on_external_display, false); EXPECT_EQ(false, mFlagManager.refresh_rate_overlay_on_external_display()); } } Loading @@ -160,12 +159,12 @@ TEST_F(FlagManagerTest, readonlyReturnsValue) { EXPECT_CALL(mFlagManager, getBoolProperty).WillRepeatedly(Return(std::nullopt)); { SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::misc1, true); SET_FLAG_FOR_TEST(flags::misc1, true); EXPECT_EQ(true, mFlagManager.misc1()); } { SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::misc1, false); SET_FLAG_FOR_TEST(flags::misc1, false); EXPECT_EQ(false, mFlagManager.misc1()); } } Loading @@ -173,15 +172,15 @@ TEST_F(FlagManagerTest, readonlyReturnsValue) { TEST_F(FlagManagerTest, dontSkipOnEarlyIsNotCached) { EXPECT_CALL(mFlagManager, getBoolProperty).WillRepeatedly(Return(std::nullopt)); const auto initialValue = com::android::graphics::surfaceflinger::flags::dont_skip_on_early(); const auto initialValue = flags::dont_skip_on_early(); com::android::graphics::surfaceflinger::flags::dont_skip_on_early(true); flags::dont_skip_on_early(true); EXPECT_EQ(true, mFlagManager.dont_skip_on_early()); com::android::graphics::surfaceflinger::flags::dont_skip_on_early(false); flags::dont_skip_on_early(false); EXPECT_EQ(false, mFlagManager.dont_skip_on_early()); com::android::graphics::surfaceflinger::flags::dont_skip_on_early(initialValue); flags::dont_skip_on_early(initialValue); } } // namespace android Loading
services/surfaceflinger/common/FlagManager.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -108,7 +108,6 @@ void FlagManager::dump(std::string& result) const { DUMP_SERVER_FLAG(use_skia_tracing); /// Trunk stable server flags /// DUMP_SERVER_FLAG(late_boot_misc2); DUMP_SERVER_FLAG(dont_skip_on_early); DUMP_SERVER_FLAG(refresh_rate_overlay_on_external_display); Loading Loading @@ -212,7 +211,6 @@ FLAG_MANAGER_READ_ONLY_FLAG(renderable_buffer_usage, "") FLAG_MANAGER_READ_ONLY_FLAG(restore_blur_step, "debug.renderengine.restore_blur_step") /// Trunk stable server flags /// FLAG_MANAGER_SERVER_FLAG(late_boot_misc2, "") FLAG_MANAGER_SERVER_FLAG(refresh_rate_overlay_on_external_display, "") /// Exceptions /// Loading
services/surfaceflinger/common/include/common/FlagManager.h +0 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ public: bool use_skia_tracing() const; /// Trunk stable server flags /// bool late_boot_misc2() const; bool dont_skip_on_early() const; bool refresh_rate_overlay_on_external_display() const; Loading
services/surfaceflinger/surfaceflinger_flags.aconfig +0 −7 Original line number Diff line number Diff line Loading @@ -17,13 +17,6 @@ flag { is_fixed_read_only: true } flag{ name: "late_boot_misc2" namespace: "core_graphics" description: "This flag controls minor miscellaneous SurfaceFlinger changes. Cannot be read before boot finished!" bug: "297389311" } flag { name: "vrr_config" namespace: "core_graphics" Loading
services/surfaceflinger/tests/unittests/FlagManagerTest.cpp +19 −20 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ namespace android { using namespace com::android::graphics::surfaceflinger; using testing::Return; class TestableFlagManager : public FlagManager { Loading Loading @@ -86,26 +87,26 @@ TEST_F(FlagManagerTest, legacyReturnsValue) { TEST_F(FlagManagerTest, creashesIfQueriedBeforeBoot) { mFlagManager.markBootIncomplete(); EXPECT_DEATH(FlagManager::getInstance().late_boot_misc2(), ""); EXPECT_DEATH(FlagManager::getInstance() .refresh_rate_overlay_on_external_display(), ""); } TEST_F(FlagManagerTest, returnsOverrideTrue) { mFlagManager.markBootCompleted(); SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::late_boot_misc2, false); SET_FLAG_FOR_TEST(flags::refresh_rate_overlay_on_external_display, false); // This is stored in a static variable, so this test depends on the fact // that this flag has not been read in this process. EXPECT_CALL(mFlagManager, getBoolProperty).WillOnce(Return(true)); EXPECT_TRUE(mFlagManager.late_boot_misc2()); EXPECT_TRUE(mFlagManager.refresh_rate_overlay_on_external_display()); // Further calls will not result in further calls to getBoolProperty. EXPECT_TRUE(mFlagManager.late_boot_misc2()); EXPECT_TRUE(mFlagManager.refresh_rate_overlay_on_external_display()); } TEST_F(FlagManagerTest, returnsOverrideReadonly) { SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::add_sf_skipped_frames_to_trace, false); SET_FLAG_FOR_TEST(flags::add_sf_skipped_frames_to_trace, false); // This is stored in a static variable, so this test depends on the fact // that this flag has not been read in this process. Loading @@ -116,9 +117,7 @@ TEST_F(FlagManagerTest, returnsOverrideReadonly) { TEST_F(FlagManagerTest, returnsOverrideFalse) { mFlagManager.markBootCompleted(); SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags:: refresh_rate_overlay_on_external_display, true); SET_FLAG_FOR_TEST(flags::refresh_rate_overlay_on_external_display, true); // This is stored in a static variable, so this test depends on the fact // that this flag has not been read in this process. Loading @@ -129,7 +128,7 @@ TEST_F(FlagManagerTest, returnsOverrideFalse) { TEST_F(FlagManagerTest, ignoresOverrideInUnitTestMode) { mFlagManager.setUnitTestMode(); SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::multithreaded_present, true); SET_FLAG_FOR_TEST(flags::multithreaded_present, true); // If this has not been called in this process, it will be called. // Regardless, the result is ignored. Loading @@ -144,13 +143,13 @@ TEST_F(FlagManagerTest, returnsValue) { EXPECT_CALL(mFlagManager, getBoolProperty).WillRepeatedly(Return(std::nullopt)); { SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::late_boot_misc2, true); EXPECT_EQ(true, mFlagManager.late_boot_misc2()); SET_FLAG_FOR_TEST(flags::refresh_rate_overlay_on_external_display, true); EXPECT_EQ(true, mFlagManager.refresh_rate_overlay_on_external_display()); } { SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::late_boot_misc2, false); EXPECT_EQ(false, mFlagManager.late_boot_misc2()); SET_FLAG_FOR_TEST(flags::refresh_rate_overlay_on_external_display, false); EXPECT_EQ(false, mFlagManager.refresh_rate_overlay_on_external_display()); } } Loading @@ -160,12 +159,12 @@ TEST_F(FlagManagerTest, readonlyReturnsValue) { EXPECT_CALL(mFlagManager, getBoolProperty).WillRepeatedly(Return(std::nullopt)); { SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::misc1, true); SET_FLAG_FOR_TEST(flags::misc1, true); EXPECT_EQ(true, mFlagManager.misc1()); } { SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::misc1, false); SET_FLAG_FOR_TEST(flags::misc1, false); EXPECT_EQ(false, mFlagManager.misc1()); } } Loading @@ -173,15 +172,15 @@ TEST_F(FlagManagerTest, readonlyReturnsValue) { TEST_F(FlagManagerTest, dontSkipOnEarlyIsNotCached) { EXPECT_CALL(mFlagManager, getBoolProperty).WillRepeatedly(Return(std::nullopt)); const auto initialValue = com::android::graphics::surfaceflinger::flags::dont_skip_on_early(); const auto initialValue = flags::dont_skip_on_early(); com::android::graphics::surfaceflinger::flags::dont_skip_on_early(true); flags::dont_skip_on_early(true); EXPECT_EQ(true, mFlagManager.dont_skip_on_early()); com::android::graphics::surfaceflinger::flags::dont_skip_on_early(false); flags::dont_skip_on_early(false); EXPECT_EQ(false, mFlagManager.dont_skip_on_early()); com::android::graphics::surfaceflinger::flags::dont_skip_on_early(initialValue); flags::dont_skip_on_early(initialValue); } } // namespace android