Bug 1583956 - Downgrade some APZC logging from debug to verbose. r=botond

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kartikaya Gupta 2020-02-27 14:41:48 +00:00
Родитель 860a0279eb
Коммит f3211c441b
1 изменённых файлов: 19 добавлений и 13 удалений

Просмотреть файл

@ -99,13 +99,19 @@
static mozilla::LazyLogModule sApzCtlLog("apz.controller"); static mozilla::LazyLogModule sApzCtlLog("apz.controller");
#define APZC_LOG(...) MOZ_LOG(sApzCtlLog, LogLevel::Debug, (__VA_ARGS__)) #define APZC_LOG(...) MOZ_LOG(sApzCtlLog, LogLevel::Debug, (__VA_ARGS__))
#define APZC_LOG_FM(fm, prefix, ...) \ #define APZC_LOGV(...) MOZ_LOG(sApzCtlLog, LogLevel::Verbose, (__VA_ARGS__))
if (MOZ_LOG_TEST(sApzCtlLog, LogLevel::Debug)) { \
#define APZC_LOG_FM_COMMON(fm, prefix, level, ...) \
if (MOZ_LOG_TEST(sApzCtlLog, level)) { \
std::stringstream ss; \ std::stringstream ss; \
ss << nsPrintfCString(prefix, __VA_ARGS__).get(); \ ss << nsPrintfCString(prefix, __VA_ARGS__).get(); \
AppendToString(ss, fm, ":", "", true); \ AppendToString(ss, fm, ":", "", true); \
APZC_LOG("%s\n", ss.str().c_str()); \ MOZ_LOG(sApzCtlLog, level, ("%s\n", ss.str().c_str())); \
} }
#define APZC_LOG_FM(fm, prefix, ...) \
APZC_LOG_FM_COMMON(fm, prefix, LogLevel::Debug, __VA_ARGS__)
#define APZC_LOGV_FM(fm, prefix, ...) \
APZC_LOG_FM_COMMON(fm, prefix, LogLevel::Verbose, __VA_ARGS__)
namespace mozilla { namespace mozilla {
namespace layers { namespace layers {
@ -3825,7 +3831,7 @@ const ScreenMargin AsyncPanZoomController::CalculatePendingDisplayPort(
float paintFactor = kDefaultEstimatedPaintDurationMs; float paintFactor = kDefaultEstimatedPaintDurationMs;
displayPort.MoveBy(velocity * paintFactor * StaticPrefs::apz_velocity_bias()); displayPort.MoveBy(velocity * paintFactor * StaticPrefs::apz_velocity_bias());
APZC_LOG_FM( APZC_LOGV_FM(
aFrameMetrics, aFrameMetrics,
"Calculated displayport as %s from velocity %s paint time %f metrics", "Calculated displayport as %s from velocity %s paint time %f metrics",
Stringify(displayPort).c_str(), ToString(aVelocity).c_str(), paintFactor); Stringify(displayPort).c_str(), ToString(aVelocity).c_str(), paintFactor);
@ -3980,7 +3986,7 @@ void AsyncPanZoomController::RequestContentRepaint(
return; return;
} }
APZC_LOG_FM(aFrameMetrics, "%p requesting content repaint", this); APZC_LOGV_FM(aFrameMetrics, "%p requesting content repaint", this);
{ // scope lock { // scope lock
MutexAutoLock lock(mCheckerboardEventLock); MutexAutoLock lock(mCheckerboardEventLock);
if (mCheckerboardEvent && mCheckerboardEvent->IsRecordingTrace()) { if (mCheckerboardEvent && mCheckerboardEvent->IsRecordingTrace()) {
@ -4420,7 +4426,7 @@ void AsyncPanZoomController::NotifyLayersUpdated(
if ((aScrollMetadata == mLastContentPaintMetadata) && !isDefault) { if ((aScrollMetadata == mLastContentPaintMetadata) && !isDefault) {
// No new information here, skip it. // No new information here, skip it.
APZC_LOG("%p NotifyLayersUpdated short-circuit\n", this); APZC_LOGV("%p NotifyLayersUpdated short-circuit\n", this);
return; return;
} }
@ -4444,7 +4450,7 @@ void AsyncPanZoomController::NotifyLayersUpdated(
} }
mScrollMetadata.SetScrollParentId(aScrollMetadata.GetScrollParentId()); mScrollMetadata.SetScrollParentId(aScrollMetadata.GetScrollParentId());
APZC_LOG_FM(aLayerMetrics, APZC_LOGV_FM(aLayerMetrics,
"%p got a NotifyLayersUpdated with aIsFirstPaint=%d, " "%p got a NotifyLayersUpdated with aIsFirstPaint=%d, "
"aThisLayerTreeUpdated=%d", "aThisLayerTreeUpdated=%d",
this, aIsFirstPaint, aThisLayerTreeUpdated); this, aIsFirstPaint, aThisLayerTreeUpdated);