summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Xiang Wang <xwxw@google.com> 2024-03-12 17:27:05 -0700
committer Xiang Wang <xwxw@google.com> 2024-03-19 22:04:26 +0000
commit05cb7647691708ae7318f4dde33aa849fa41d3e6 (patch)
tree1e7010f76715b5a020f389157f8bb44a46989394
parenta080e37010de88182839a4d9a66a15aa46bb38f0 (diff)
Add ADPF GPU impl flag for SurfaceFlinger
Bug: 284324521 Test: atest FlagManagerTest Change-Id: Iaa137969d00aa5cfd50b3c647cdd836e09b9d63e
-rw-r--r--services/surfaceflinger/common/FlagManager.cpp2
-rw-r--r--services/surfaceflinger/common/include/common/FlagManager.h1
-rw-r--r--services/surfaceflinger/surfaceflinger_flags_new.aconfig7
-rw-r--r--services/surfaceflinger/tests/unittests/FlagManagerTest.cpp2
4 files changed, 11 insertions, 1 deletions
diff --git a/services/surfaceflinger/common/FlagManager.cpp b/services/surfaceflinger/common/FlagManager.cpp
index 3c2ccbc262..6aa7f7a6c8 100644
--- a/services/surfaceflinger/common/FlagManager.cpp
+++ b/services/surfaceflinger/common/FlagManager.cpp
@@ -110,6 +110,7 @@ void FlagManager::dump(std::string& result) const {
/// Trunk stable server flags ///
DUMP_SERVER_FLAG(refresh_rate_overlay_on_external_display);
+ DUMP_SERVER_FLAG(adpf_gpu_sf);
DUMP_SERVER_FLAG(adpf_use_fmq_channel);
/// Trunk stable readonly flags ///
@@ -220,6 +221,7 @@ FLAG_MANAGER_READ_ONLY_FLAG(protected_if_client, "")
/// Trunk stable server flags ///
FLAG_MANAGER_SERVER_FLAG(refresh_rate_overlay_on_external_display, "")
+FLAG_MANAGER_SERVER_FLAG(adpf_gpu_sf, "")
/// Trunk stable server flags from outside SurfaceFlinger ///
FLAG_MANAGER_SERVER_FLAG_IMPORTED(adpf_use_fmq_channel, "", android::os)
diff --git a/services/surfaceflinger/common/include/common/FlagManager.h b/services/surfaceflinger/common/include/common/FlagManager.h
index 763963e24f..ea3fedba7f 100644
--- a/services/surfaceflinger/common/include/common/FlagManager.h
+++ b/services/surfaceflinger/common/include/common/FlagManager.h
@@ -49,6 +49,7 @@ public:
/// Trunk stable server flags ///
bool refresh_rate_overlay_on_external_display() const;
+ bool adpf_gpu_sf() const;
bool adpf_use_fmq_channel() const;
/// Trunk stable readonly flags ///
diff --git a/services/surfaceflinger/surfaceflinger_flags_new.aconfig b/services/surfaceflinger/surfaceflinger_flags_new.aconfig
index 5451752d91..9d61fe691a 100644
--- a/services/surfaceflinger/surfaceflinger_flags_new.aconfig
+++ b/services/surfaceflinger/surfaceflinger_flags_new.aconfig
@@ -4,6 +4,13 @@ package: "com.android.graphics.surfaceflinger.flags"
container: "system"
flag {
+ name: "adpf_gpu_sf"
+ namespace: "game"
+ description: "Guards use of the sending ADPF GPU duration hint and load hints from SurfaceFlinger to Power HAL"
+ bug: "284324521"
+} # adpf_gpu_sf
+
+flag {
name: "dont_skip_on_early_ro2"
namespace: "core_graphics"
description: "This flag is guarding the behaviour where SurfaceFlinger is trying to opportunistically present a frame when the configuration change from late to early"
diff --git a/services/surfaceflinger/tests/unittests/FlagManagerTest.cpp b/services/surfaceflinger/tests/unittests/FlagManagerTest.cpp
index 0adf0b617a..51b5f40a52 100644
--- a/services/surfaceflinger/tests/unittests/FlagManagerTest.cpp
+++ b/services/surfaceflinger/tests/unittests/FlagManagerTest.cpp
@@ -85,7 +85,7 @@ TEST_F(FlagManagerTest, legacyReturnsValue) {
EXPECT_EQ(false, mFlagManager.test_flag());
}
-TEST_F(FlagManagerTest, creashesIfQueriedBeforeBoot) {
+TEST_F(FlagManagerTest, crashesIfQueriedBeforeBoot) {
mFlagManager.markBootIncomplete();
EXPECT_DEATH(FlagManager::getInstance()
.refresh_rate_overlay_on_external_display(), "");