Loading services/surfaceflinger/FrameTimeline/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ cc_library_static { ], static_libs: [ "libperfetto_client_experimental", "libsurfaceflinger_common", ], export_include_dirs: ["."], } services/surfaceflinger/FrameTimeline/FrameTimeline.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include "FrameTimeline.h" #include <android-base/stringprintf.h> #include <common/FlagManager.h> #include <utils/Log.h> #include <utils/Trace.h> Loading Loading @@ -1200,8 +1201,10 @@ void FrameTimeline::DisplayFrame::trace(pid_t surfaceFlingerPid, nsecs_t monoBoo surfaceFrame->trace(mToken, monoBootOffset); } if (FlagManager::getInstance().add_sf_skipped_frames_to_trace()) { addSkippedFrame(surfaceFlingerPid, monoBootOffset, previousActualPresentTime); } } float FrameTimeline::computeFps(const std::unordered_set<int32_t>& layerIds) { if (layerIds.empty()) { Loading services/surfaceflinger/common/FlagManager.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ void FlagManager::dump(std::string& result) const { DUMP_READ_ONLY_FLAG(hotplug2); DUMP_READ_ONLY_FLAG(hdcp_level_hal); DUMP_READ_ONLY_FLAG(multithreaded_present); DUMP_READ_ONLY_FLAG(add_sf_skipped_frames_to_trace); #undef DUMP_READ_ONLY_FLAG #undef DUMP_SERVER_FLAG Loading Loading @@ -188,6 +189,7 @@ FLAG_MANAGER_READ_ONLY_FLAG(vrr_config, "debug.sf.enable_vrr_config") FLAG_MANAGER_READ_ONLY_FLAG(hotplug2, "") FLAG_MANAGER_READ_ONLY_FLAG(hdcp_level_hal, "") FLAG_MANAGER_READ_ONLY_FLAG(multithreaded_present, "debug.sf.multithreaded_present") FLAG_MANAGER_READ_ONLY_FLAG(add_sf_skipped_frames_to_trace, "") /// Trunk stable server flags /// FLAG_MANAGER_SERVER_FLAG(late_boot_misc2, "") Loading services/surfaceflinger/common/include/common/FlagManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ public: bool hotplug2() const; bool hdcp_level_hal() const; bool multithreaded_present() const; bool add_sf_skipped_frames_to_trace() const; protected: // overridden for unit tests Loading services/surfaceflinger/surfaceflinger_flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,14 @@ flag { is_fixed_read_only: true } flag { name: "add_sf_skipped_frames_to_trace" namespace: "core_graphics" description: "Add SurfaceFlinger dropped Frames to frame timeline" bug: "273701290" is_fixed_read_only: true } flag { name: "refresh_rate_overlay_on_external_display" namespace: "core_graphics" Loading Loading
services/surfaceflinger/FrameTimeline/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ cc_library_static { ], static_libs: [ "libperfetto_client_experimental", "libsurfaceflinger_common", ], export_include_dirs: ["."], }
services/surfaceflinger/FrameTimeline/FrameTimeline.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include "FrameTimeline.h" #include <android-base/stringprintf.h> #include <common/FlagManager.h> #include <utils/Log.h> #include <utils/Trace.h> Loading Loading @@ -1200,8 +1201,10 @@ void FrameTimeline::DisplayFrame::trace(pid_t surfaceFlingerPid, nsecs_t monoBoo surfaceFrame->trace(mToken, monoBootOffset); } if (FlagManager::getInstance().add_sf_skipped_frames_to_trace()) { addSkippedFrame(surfaceFlingerPid, monoBootOffset, previousActualPresentTime); } } float FrameTimeline::computeFps(const std::unordered_set<int32_t>& layerIds) { if (layerIds.empty()) { Loading
services/surfaceflinger/common/FlagManager.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ void FlagManager::dump(std::string& result) const { DUMP_READ_ONLY_FLAG(hotplug2); DUMP_READ_ONLY_FLAG(hdcp_level_hal); DUMP_READ_ONLY_FLAG(multithreaded_present); DUMP_READ_ONLY_FLAG(add_sf_skipped_frames_to_trace); #undef DUMP_READ_ONLY_FLAG #undef DUMP_SERVER_FLAG Loading Loading @@ -188,6 +189,7 @@ FLAG_MANAGER_READ_ONLY_FLAG(vrr_config, "debug.sf.enable_vrr_config") FLAG_MANAGER_READ_ONLY_FLAG(hotplug2, "") FLAG_MANAGER_READ_ONLY_FLAG(hdcp_level_hal, "") FLAG_MANAGER_READ_ONLY_FLAG(multithreaded_present, "debug.sf.multithreaded_present") FLAG_MANAGER_READ_ONLY_FLAG(add_sf_skipped_frames_to_trace, "") /// Trunk stable server flags /// FLAG_MANAGER_SERVER_FLAG(late_boot_misc2, "") Loading
services/surfaceflinger/common/include/common/FlagManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ public: bool hotplug2() const; bool hdcp_level_hal() const; bool multithreaded_present() const; bool add_sf_skipped_frames_to_trace() const; protected: // overridden for unit tests Loading
services/surfaceflinger/surfaceflinger_flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,14 @@ flag { is_fixed_read_only: true } flag { name: "add_sf_skipped_frames_to_trace" namespace: "core_graphics" description: "Add SurfaceFlinger dropped Frames to frame timeline" bug: "273701290" is_fixed_read_only: true } flag { name: "refresh_rate_overlay_on_external_display" namespace: "core_graphics" Loading