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

Commit 6129c87e authored by Sally Qi's avatar Sally Qi Committed by Android (Google) Code Review
Browse files

Merge "Enable refreshrate indicator on external display." into main

parents 4093ea71 de329f21
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ void FlagManager::dump(std::string& result) const {
    /// 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);

    /// Trunk stable readonly flags ///
    DUMP_READ_ONLY_FLAG(connected_display);
@@ -190,6 +191,7 @@ FLAG_MANAGER_READ_ONLY_FLAG(multithreaded_present, "debug.sf.multithreaded_prese

/// Trunk stable server flags ///
FLAG_MANAGER_SERVER_FLAG(late_boot_misc2, "")
FLAG_MANAGER_SERVER_FLAG(refresh_rate_overlay_on_external_display, "")

/// Exceptions ///
bool FlagManager::dont_skip_on_early() const {
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ public:
    /// Trunk stable server flags ///
    bool late_boot_misc2() const;
    bool dont_skip_on_early() const;
    bool refresh_rate_overlay_on_external_display() const;

    /// Trunk stable readonly flags ///
    bool connected_display() const;
+2 −1
Original line number Diff line number Diff line
@@ -8422,7 +8422,8 @@ status_t SurfaceFlinger::setSmallAreaDetectionThreshold(int32_t appId, float thr
void SurfaceFlinger::enableRefreshRateOverlay(bool enable) {
    bool setByHwc = getHwComposer().hasCapability(Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG);
    for (const auto& [id, display] : mPhysicalDisplays) {
        if (display.snapshot().connectionType() == ui::DisplayConnectionType::Internal) {
        if (display.snapshot().connectionType() == ui::DisplayConnectionType::Internal ||
            FlagManager::getInstance().refresh_rate_overlay_on_external_display()) {
            if (const auto device = getDisplayDeviceLocked(id)) {
                const auto enableOverlay = [&](const bool setByHwc) FTL_FAKE_GUARD(
                                                   kMainThreadContext) {
+6 −0
Original line number Diff line number Diff line
@@ -70,3 +70,9 @@ flag {
  is_fixed_read_only: true
}

flag {
  name: "refresh_rate_overlay_on_external_display"
  namespace: "core_graphics"
  description: "enable refresh rate indicator on the external display"
  bug: "301647974"
}