Update the frameCallback postAt time.
Bug: 260089749 Test: Manual Change-Id: I3a37c2a482c461f3347cc47601246afb25823866
This commit is contained in:
@@ -135,7 +135,9 @@ void RenderThread::frameCallback(int64_t vsyncId, int64_t frameDeadline, int64_t
|
||||
!mFrameCallbackTaskPending) {
|
||||
ATRACE_NAME("queue mFrameCallbackTask");
|
||||
mFrameCallbackTaskPending = true;
|
||||
nsecs_t runAt = (frameTimeNanos + mDispatchFrameDelay);
|
||||
|
||||
nsecs_t timeUntilDeadline = frameDeadline - frameTimeNanos;
|
||||
nsecs_t runAt = (frameTimeNanos + (timeUntilDeadline * 0.25f));
|
||||
queue().postAt(runAt, [=]() { dispatchFrameCallbacks(); });
|
||||
}
|
||||
}
|
||||
@@ -257,7 +259,6 @@ void RenderThread::initThreadLocals() {
|
||||
void RenderThread::setupFrameInterval() {
|
||||
nsecs_t frameIntervalNanos = DeviceInfo::getVsyncPeriod();
|
||||
mTimeLord.setFrameInterval(frameIntervalNanos);
|
||||
mDispatchFrameDelay = static_cast<nsecs_t>(frameIntervalNanos * .25f);
|
||||
}
|
||||
|
||||
void RenderThread::requireGlContext() {
|
||||
|
||||
@@ -235,7 +235,6 @@ private:
|
||||
bool mFrameCallbackTaskPending;
|
||||
|
||||
TimeLord mTimeLord;
|
||||
nsecs_t mDispatchFrameDelay = 4_ms;
|
||||
RenderState* mRenderState;
|
||||
EglManager* mEglManager;
|
||||
WebViewFunctorManager& mFunctorManager;
|
||||
|
||||
Reference in New Issue
Block a user