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

Commit a1a64dc3 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[HWUI] Add null check for CanvasContext" into rvc-dev am: c2e20c4b

Change-Id: Ib452de51c1b76cd6f5d5db4b04f70a4744d309ed
parents d6f32582 c2e20c4b
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -555,9 +555,11 @@ void CanvasContext::draw() {
        FrameInfo* forthBehind = mLast4FrameInfos.front().first;
        FrameInfo* forthBehind = mLast4FrameInfos.front().first;
        int64_t composedFrameId = mLast4FrameInfos.front().second;
        int64_t composedFrameId = mLast4FrameInfos.front().second;
        nsecs_t acquireTime = -1;
        nsecs_t acquireTime = -1;
        if (mNativeSurface) {
            native_window_get_frame_timestamps(mNativeSurface->getNativeWindow(), composedFrameId,
            native_window_get_frame_timestamps(mNativeSurface->getNativeWindow(), composedFrameId,
                                               nullptr, &acquireTime, nullptr, nullptr, nullptr,
                                               nullptr, &acquireTime, nullptr, nullptr, nullptr,
                                               nullptr, nullptr, nullptr, nullptr);
                                               nullptr, nullptr, nullptr, nullptr);
        }
        // Ignore default -1, NATIVE_WINDOW_TIMESTAMP_INVALID and NATIVE_WINDOW_TIMESTAMP_PENDING
        // Ignore default -1, NATIVE_WINDOW_TIMESTAMP_INVALID and NATIVE_WINDOW_TIMESTAMP_PENDING
        forthBehind->set(FrameInfoIndex::GpuCompleted) = acquireTime > 0 ? acquireTime : -1;
        forthBehind->set(FrameInfoIndex::GpuCompleted) = acquireTime > 0 ? acquireTime : -1;
        mJankTracker.finishGpuDraw(*forthBehind);
        mJankTracker.finishGpuDraw(*forthBehind);