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

Commit 996a8fe4 authored by Ady Abraham's avatar Ady Abraham Committed by Android (Google) Code Review
Browse files

Merge changes Ie87e9d27,I35cd5b7d into main

* changes:
  libgui: add a flag for bq_setframerate
  SF: add a server writable flag (non boot stable)
parents 2652b0f8 91e1a575
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -192,6 +192,18 @@ cc_library_static {
    },
}

aconfig_declarations {
    name: "libgui_flags",
    package: "com.android.graphics.libgui.flags",
    srcs: ["libgui_flags.aconfig"],
}

cc_aconfig_library {
    name: "libguiflags",
    vendor_available: true,
    aconfig_declarations: "libgui_flags",
}

cc_library_shared {
    name: "libgui",
    vendor_available: true,
@@ -206,6 +218,7 @@ cc_library_shared {
    static_libs: [
        "libgui_aidl_static",
        "libgui_window_info_static",
        "libguiflags",
    ],
    export_static_lib_headers: [
        "libgui_aidl_static",
+10 −0
Original line number Diff line number Diff line
package: "com.android.graphics.libgui.flags"

flag {
  name: "bq_setframerate"
  namespace: "core_graphics"
  description: "This flag controls plumbing setFrameRate thru BufferQueue"
  bug: "281695725"
  is_fixed_read_only: true
}
+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"
}