Bug 1676852 - Investigate if RefreshDriver run on idle queue should update mLastFireTime sooner, r=farre
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Fri, 13 Nov 2020 22:07:53 +0000
changeset 557212 f488d4345f75ec8a97b029a7dd929fa38a1a4434
parent 557211 42f9d968a9a9dbda7b7eea4452fe8ebcec7b9e2e
child 557213 8fb8771d7364414e18ea954a210dab543ee7daee
push id37948
push userncsoregi@mozilla.com
push dateSat, 14 Nov 2020 09:46:25 +0000
treeherdermozilla-central@a39af1b7ae7f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfarre
bugs1676852
milestone84.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1676852 - Investigate if RefreshDriver run on idle queue should update mLastFireTime sooner, r=farre Differential Revision: https://phabricator.services.mozilla.com/D96948
layout/base/nsRefreshDriver.cpp
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -634,16 +634,18 @@ class VsyncRefreshDriverTimer : public R
                     rate.ToMilliseconds() * frameRateMultiplier);
                 pctx->DidUseFrameRateMultiplier();
                 nsCOMPtr<nsIRunnable> vsyncEvent = NewRunnableMethod<>(
                     "RefreshDriverVsyncObserver::NormalPriorityNotify[IDLE]",
                     this, &RefreshDriverVsyncObserver::NormalPriorityNotify);
                 NS_DispatchToCurrentThreadQueue(vsyncEvent.forget(), slowRate,
                                                 EventQueuePriority::Idle);
               }
+              // Pretend that RefreshDriver did run on time.
+              mVsyncRefreshDriverTimer->mLastFireTime = TimeStamp::Now();
               return;
             }
           }
         }
       }
 
       RefPtr<RefreshDriverVsyncObserver> kungFuDeathGrip(this);
       TickRefreshDriver(aVsync.mId, aVsync.mTime);