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

Commit 869cb2ad authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Adjust present time calculation"

parents f295fd9f 56cffe5b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -429,7 +429,8 @@ void CanvasContext::setPresentTime() {

    if (renderAhead) {
        presentTime = mCurrentFrameInfo->get(FrameInfoIndex::Vsync) +
                (frameIntervalNanos * (renderAhead + 1));
                (frameIntervalNanos * (renderAhead + 1)) - DeviceInfo::get()->getAppOffset() +
                (frameIntervalNanos / 2);
    }
    native_window_set_buffers_timestamp(mNativeSurface->getNativeWindow(), presentTime);
}