Bug 1618501 - Don't go into the hit-testing tree dumping codepath if we're not actually dumping. r=botond

This avoids doing a full recursive walk of the tree for no purpose unless
the logging is actually enabled.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kartikaya Gupta 2020-02-28 15:34:11 +00:00
parent 06bbe43c45
commit 1d2638f1bb

View File

@ -642,7 +642,7 @@ APZCTreeManager::UpdateHitTestingTreeImpl(const ScrollNode& aRoot,
}
APZCTM_LOG("APZCTreeManager (%p)\n", this);
if (mRootNode) {
if (mRootNode && MOZ_LOG_TEST(sApzMgrLog, LogLevel::Debug)) {
mRootNode->Dump(" ");
}
SendSubtreeTransformsToChromeMainThread(nullptr);