Bug 1041751 - Do not create an empty APZ test data bucket for each paint when APZ test logging is not pref'd on. r=kats

This commit is contained in:
Botond Ballo
2014-07-22 15:35:18 -04:00
parent 899fb99eab
commit 5987b0f91e
2 changed files with 12 additions and 5 deletions

View File

@@ -28,6 +28,7 @@
#include "nsXULAppAPI.h" // for XRE_GetProcessType, etc
#include "TiledLayerBuffer.h"
#include "mozilla/dom/WindowBinding.h" // for Overfill Callback
#include "gfxPrefs.h"
#ifdef MOZ_WIDGET_ANDROID
#include "AndroidBridge.h"
#endif
@@ -165,7 +166,7 @@ ClientLayerManager::BeginTransactionWithTarget(gfxContext* aTarget)
}
// If this is a new paint, increment the paint sequence number.
if (!mIsRepeatTransaction) {
if (gfxPrefs::APZTestLoggingEnabled() && !mIsRepeatTransaction) {
++mPaintSequenceNumber;
mApzTestData.StartNewPaint(mPaintSequenceNumber);
}
@@ -324,6 +325,14 @@ ClientLayerManager::GetCompositorSideAPZTestData(APZTestData* aData) const
}
}
void
ClientLayerManager::StartNewRepaintRequest(SequenceNumber aSequenceNumber)
{
if (gfxPrefs::APZTestLoggingEnabled()) {
mApzTestData.StartNewRepaintRequest(aSequenceNumber);
}
}
bool
ClientLayerManager::RequestOverfill(mozilla::dom::OverfillCallback* aCallback)
{