Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e54cdcb authored by Ady Abraham's avatar Ady Abraham
Browse files

SF: add a server writable flag (non boot stable)

Bug: 297389311
Test: presubmit
Change-Id: I35cd5b7dd6160bcc45873eafae35c7497539fe56
parent 32295332
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -497,6 +497,7 @@ SurfaceFlinger::SurfaceFlinger(Factory& factory) : SurfaceFlinger(factory, SkipI
    // Trunk-Stable flags
    mMiscFlagValue = flags::misc1();
    mConnectedDisplayFlagValue = flags::connected_display();
    mMisc2FlagEarlyBootValue = flags::late_boot_misc2();
}

LatchUnsignaledConfig SurfaceFlinger::getLatchUnsignaledConfig() {
@@ -740,6 +741,8 @@ void SurfaceFlinger::bootFinished() {
    }));

    LOG_ALWAYS_FATAL_IF(flags::misc1() != mMiscFlagValue, "misc1 flag is not boot stable!");

    mMisc2FlagLateBootValue = flags::late_boot_misc2();
}

static std::optional<renderengine::RenderEngine::RenderEngineType>
@@ -6346,6 +6349,9 @@ void SurfaceFlinger::dumpAllLocked(const DumpArgs& args, const std::string& comp
    StringAppendF(&result, "MiscFlagValue: %s\n", mMiscFlagValue ? "true" : "false");
    StringAppendF(&result, "ConnectedDisplayFlagValue: %s\n",
                  mConnectedDisplayFlagValue ? "true" : "false");
    StringAppendF(&result, "Misc2FlagValue: %s (%s after boot)\n",
                  mMisc2FlagLateBootValue ? "true" : "false",
                  mMisc2FlagEarlyBootValue == mMisc2FlagLateBootValue ? "stable" : "modified");

    getRenderEngine().dump(result);

+2 −0
Original line number Diff line number Diff line
@@ -1454,6 +1454,8 @@ private:
    // Trunk-Stable flags
    bool mMiscFlagValue;
    bool mConnectedDisplayFlagValue;
    bool mMisc2FlagEarlyBootValue;
    bool mMisc2FlagLateBootValue;
};

class SurfaceComposerAIDL : public gui::BnSurfaceComposer {
+7 −0
Original line number Diff line number Diff line
@@ -15,3 +15,10 @@ flag {
  bug: "278199093"
  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"
}