Bug 1501046 - Skip reporting checkerboarding to telemetry if the sanity test is running. r=botond

This is not really the best fix (a better one would be to ensure that the
displayport is set on the root element of the gfx sanity window), but should
do as a stopgap solution.

Differential Revision: https://phabricator.services.mozilla.com/D9667

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kartikaya Gupta 2018-10-24 17:08:36 +00:00
parent 13191f2ae4
commit df09857871
2 changed files with 13 additions and 7 deletions

View File

@ -4108,13 +4108,17 @@ AsyncPanZoomController::UpdateCheckerboardEvent(const MutexAutoLock& aProofOfLoc
uint32_t aMagnitude)
{
if (mCheckerboardEvent && mCheckerboardEvent->RecordFrameInfo(aMagnitude)) {
// This checkerboard event is done. Report some metrics to telemetry.
// This checkerboard event is done. Report some metrics to telemetry, but
// skip reporting if the sanity checker window is running, because we get
// checkerboarding reported on that window that we don't really care about.
if (!gfxPrefs::SanityTestRunning()) {
mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_SEVERITY,
mCheckerboardEvent->GetSeverity());
mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_PEAK,
mCheckerboardEvent->GetPeak());
mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_DURATION,
(uint32_t)mCheckerboardEvent->GetDuration().ToMilliseconds());
}
mPotentialCheckerboardTracker.CheckerboardDone();

View File

@ -741,6 +741,8 @@ private:
DECL_GFX_PREF(Live, "print.font-variations-as-paths", PrintFontVariationsAsPaths, bool, true);
DECL_GFX_PREF(Live, "sanity-test.running", SanityTestRunning, bool, false);
DECL_GFX_PREF(Once, "slider.snapMultiplier", SliderSnapMultiplier, int32_t, 0);
DECL_GFX_PREF(Live, "test.events.async.enabled", TestEventsAsyncEnabled, bool, false);