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

Commit 9325608d authored by Ady Abraham's avatar Ady Abraham
Browse files

SF: improve activeMode log in dumpsys

Test: adb shell dumpsys SurfaceFlinger
Change-Id: I06a03d3ce841ac18aad70c2945bdb75885fb8f50
parent 49bf32d3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1590,7 +1590,8 @@ void RefreshRateSelector::dump(utils::Dumper& dumper) const {
    std::lock_guard lock(mLock);

    const auto activeMode = getActiveModeLocked();
    dumper.dump("activeMode"sv, to_string(activeMode));
    dumper.dump("renderRate"sv, to_string(activeMode.fps));
    dumper.dump("activeMode"sv, to_string(*activeMode.modePtr));

    dumper.dump("displayModes"sv);
    {
+5 −2
Original line number Diff line number Diff line
@@ -36,8 +36,11 @@ struct FrameRateMode {
};

inline std::string to_string(const FrameRateMode& mode) {
    return to_string(mode.fps) + " (" + to_string(mode.modePtr->getPeakFps()) + "(" +
            to_string(mode.modePtr->getVsyncRate()) + "))";
    return base::StringPrintf("{fps=%s, modePtr={id=%d, vsyncRate=%s, peakRefreshRate=%s}}",
                              to_string(mode.fps).c_str(),
                              ftl::to_underlying(mode.modePtr->getId()),
                              to_string(mode.modePtr->getVsyncRate()).c_str(),
                              to_string(mode.modePtr->getPeakFps()).c_str());
}

} // namespace android::scheduler