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

Commit 248bce89 authored by Ady Abraham's avatar Ady Abraham
Browse files

SF: trace vsyncPeriod from onComposerHalVsync

Test: manual
Change-Id: Ie447c65eafc11e6c1c0bc32401501b1499a73e6b
parent 3605a856
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1710,7 +1710,15 @@ nsecs_t SurfaceFlinger::getVsyncPeriodFromHWC() const {

void SurfaceFlinger::onComposerHalVsync(hal::HWDisplayId hwcDisplayId, int64_t timestamp,
                                        std::optional<hal::VsyncPeriodNanos> vsyncPeriod) {
    ATRACE_CALL();
    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());

    Mutex::Autolock lock(mStateLock);
    const auto displayId = getHwComposer().toPhysicalDisplayId(hwcDisplayId);