summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Brian Johnson <hibrian@google.com> 2023-09-07 10:52:30 -0700
committer Brian Johnson <hibrian@google.com> 2023-09-07 12:54:14 -0700
commitc99f638c2d1e81837e7e908172934f5f7c066a0d (patch)
tree1baf8b9def07101121c9f1fd25c57e3046e0c524
parentad16bf27ab695919347965d917de3c1c7ed5cb0f (diff)
SF: Add a flag for the connected-display feature
Bug: 299486625 Test: adb shell dumpsys SurfaceFlinger -- check for "ConnectedDisplayFlagValue" Change-Id: I4526091ca938ef378877edf63b499a3c8c8a39d9
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp4
-rw-r--r--services/surfaceflinger/SurfaceFlinger.h2
-rw-r--r--services/surfaceflinger/surfaceflinger_flags.aconfig10
3 files changed, 15 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index a7f2845a61..517dc96195 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -494,7 +494,9 @@ SurfaceFlinger::SurfaceFlinger(Factory& factory) : SurfaceFlinger(factory, SkipI
mLegacyFrontEndEnabled = !mLayerLifecycleManagerEnabled ||
base::GetBoolProperty("persist.debug.sf.enable_legacy_frontend"s, false);
+ // Trunk-Stable flags
mMiscFlagValue = flags::misc1();
+ mConnectedDisplayFlagValue = flags::connected_display();
}
LatchUnsignaledConfig SurfaceFlinger::getLatchUnsignaledConfig() {
@@ -6342,6 +6344,8 @@ void SurfaceFlinger::dumpAllLocked(const DumpArgs& args, const std::string& comp
colorizer.reset(result);
StringAppendF(&result, "MiscFlagValue: %s\n", mMiscFlagValue ? "true" : "false");
+ StringAppendF(&result, "ConnectedDisplayFlagValue: %s\n",
+ mConnectedDisplayFlagValue ? "true" : "false");
getRenderEngine().dump(result);
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index f7525840f8..59b1172edc 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -1451,7 +1451,9 @@ private:
void sfdo_scheduleComposite();
void sfdo_scheduleCommit();
+ // Trunk-Stable flags
bool mMiscFlagValue;
+ bool mConnectedDisplayFlagValue;
};
class SurfaceComposerAIDL : public gui::BnSurfaceComposer {
diff --git a/services/surfaceflinger/surfaceflinger_flags.aconfig b/services/surfaceflinger/surfaceflinger_flags.aconfig
index 0a368884ae..f47ed453ee 100644
--- a/services/surfaceflinger/surfaceflinger_flags.aconfig
+++ b/services/surfaceflinger/surfaceflinger_flags.aconfig
@@ -6,4 +6,12 @@ flag {
description: "This flag controls minor miscellaneous SurfaceFlinger changes"
bug: "297389311"
is_fixed_read_only: true
-} \ No newline at end of file
+}
+
+flag {
+ name: "connected_display"
+ namespace: "core_graphics"
+ description: "Controls SurfaceFlinger support for Connected Displays"
+ bug: "278199093"
+ is_fixed_read_only: true
+}