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

Commit 4ca7bf11 authored by Ady Abraham's avatar Ady Abraham Committed by Automerger Merge Worker
Browse files

Merge "SF: fix frame timeline timestamp" into tm-dev am: 9ca4184c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/17257830

Change-Id: Iaa7267393fa347aca624faec6e6d66b07da61828
parents 0866833a 9ca4184c
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -669,12 +669,12 @@ void SurfaceFrame::traceActuals(int64_t displayFrameToken, nsecs_t monoBootOffse
            // frame in the trace.
            nsecs_t endTime =
                    (mPresentState == PresentState::Dropped ? mDropTime : mActuals.endTime);
            packet->set_timestamp(static_cast<uint64_t>(endTime - kPredictionExpiredStartTimeDelta +
                                                        monoBootOffset));
            const auto timestamp = endTime - kPredictionExpiredStartTimeDelta;
            packet->set_timestamp(static_cast<uint64_t>(timestamp + monoBootOffset));
        } else {
            packet->set_timestamp(static_cast<uint64_t>(monoBootOffset + mActuals.startTime == 0
                                                                ? mPredictions.startTime
                                                                : mActuals.startTime));
            const auto timestamp =
                    mActuals.startTime == 0 ? mPredictions.startTime : mActuals.startTime;
            packet->set_timestamp(static_cast<uint64_t>(timestamp + monoBootOffset));
        }

        auto* event = packet->set_frame_timeline_event();