Loading services/surfaceflinger/FlagManager.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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 { Loading services/surfaceflinger/FlagManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -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; Loading services/surfaceflinger/SurfaceFlinger.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading services/surfaceflinger/surfaceflinger_flags.aconfig +6 −0 Original line number Diff line number Diff line Loading @@ -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" } Loading
services/surfaceflinger/FlagManager.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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 { Loading
services/surfaceflinger/FlagManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -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; Loading
services/surfaceflinger/SurfaceFlinger.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading
services/surfaceflinger/surfaceflinger_flags.aconfig +6 −0 Original line number Diff line number Diff line Loading @@ -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" }