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

Commit c840c0bf authored by Kodi Obika's avatar Kodi Obika Committed by Mathieu Chartier
Browse files

Added trace event to screenrecord

Bug: 135278534
Test: Run Perfetto with "screen recording" enabled and execute
a query for the "first_frame" slice

MergedIn: Ifb984bfb0cdf48c61352e2923de42ce0ca06ace7
Change-Id: I20abf7300e8c46b6e6dc52096db699e95c93297d
parent 096daf42
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -417,6 +417,7 @@ static status_t runEncoder(const sp<MediaCodec>& encoder,
    int64_t endWhenNsec = startWhenNsec + seconds_to_nanoseconds(gTimeLimitSec);
    DisplayInfo mainDpyInfo;
    Vector<int64_t> timestamps;
    bool firstFrame = true;

    assert((rawFp == NULL && muxer != NULL) || (rawFp != NULL && muxer == NULL));

@@ -433,6 +434,11 @@ static status_t runEncoder(const sp<MediaCodec>& encoder,
        int64_t ptsUsec;
        uint32_t flags;

        if (firstFrame) {
            ATRACE_NAME("first_frame");
            firstFrame = false;
        }

        if (systemTime(CLOCK_MONOTONIC) > endWhenNsec) {
            if (gVerbose) {
                printf("Time limit reached\n");