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

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

Merge "Add trunk flag for adding SF skipped frames into traces." into main

parents 59e5c729 f5721257
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ cc_library_static {
    ],
    static_libs: [
        "libperfetto_client_experimental",
        "libsurfaceflinger_common",
    ],
    export_include_dirs: ["."],
}
+4 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include "FrameTimeline.h"

#include <android-base/stringprintf.h>
#include <common/FlagManager.h>
#include <utils/Log.h>
#include <utils/Trace.h>

@@ -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()) {
+2 −0
Original line number Diff line number Diff line
@@ -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
@@ -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, "")
+1 −0
Original line number Diff line number Diff line
@@ -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
+8 −0
Original line number Diff line number Diff line
@@ -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