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

Commit 3d48304d authored by Dominik Laskowski's avatar Dominik Laskowski
Browse files

SF: Trace hal::HWDisplayId on hardware VSYNC

...as the event may or may not be routed to a PhysicalDisplayId.

Bug: 241285473
Bug: 264877492
Test: Perfetto
Change-Id: I9a2526e18e407d54d0917f8d7d9a1ae1291172a1
parent f40c23e9
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -2031,15 +2031,9 @@ nsecs_t SurfaceFlinger::getVsyncPeriodFromHWC() const {

void SurfaceFlinger::onComposerHalVsync(hal::HWDisplayId hwcDisplayId, int64_t timestamp,
                                        std::optional<hal::VsyncPeriodNanos> vsyncPeriod) {
    const std::string tracePeriod = [vsyncPeriod]() {
        if (ATRACE_ENABLED() && vsyncPeriod) {
            std::stringstream ss;
            ss << "(" << *vsyncPeriod << ")";
            return ss.str();
        }
        return std::string();
    }();
    ATRACE_FORMAT("onComposerHalVsync%s", tracePeriod.c_str());
    ATRACE_NAME(vsyncPeriod
                        ? ftl::Concat(__func__, ' ', hwcDisplayId, ' ', *vsyncPeriod, "ns").c_str()
                        : ftl::Concat(__func__, ' ', hwcDisplayId).c_str());

    Mutex::Autolock lock(mStateLock);