mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
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:
parent
9f9f5c5ae2
commit
4dc8bf13d7
@ -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
|
||||
@ -167,7 +168,9 @@ ClientLayerManager::BeginTransactionWithTarget(gfxContext* aTarget)
|
||||
// If this is a new paint, increment the paint sequence number.
|
||||
if (!mIsRepeatTransaction) {
|
||||
++mPaintSequenceNumber;
|
||||
mApzTestData.StartNewPaint(mPaintSequenceNumber);
|
||||
if (gfxPrefs::APZTestLoggingEnabled()) {
|
||||
mApzTestData.StartNewPaint(mPaintSequenceNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -324,6 +327,14 @@ ClientLayerManager::GetCompositorSideAPZTestData(APZTestData* aData) const
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ClientLayerManager::StartNewRepaintRequest(SequenceNumber aSequenceNumber)
|
||||
{
|
||||
if (gfxPrefs::APZTestLoggingEnabled()) {
|
||||
mApzTestData.StartNewRepaintRequest(aSequenceNumber);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
ClientLayerManager::RequestOverfill(mozilla::dom::OverfillCallback* aCallback)
|
||||
{
|
||||
|
@ -203,10 +203,8 @@ public:
|
||||
// Log APZ test data for a repaint request. The sequence number must be
|
||||
// passed in from outside, and APZTestData::StartNewRepaintRequest() needs
|
||||
// to be called from the outside as well when a new repaint request is started.
|
||||
void StartNewRepaintRequest(SequenceNumber aSequenceNumber)
|
||||
{
|
||||
mApzTestData.StartNewRepaintRequest(aSequenceNumber);
|
||||
}
|
||||
void StartNewRepaintRequest(SequenceNumber aSequenceNumber);
|
||||
|
||||
// TODO(botond): When we start using this and write a wrapper similar to
|
||||
// nsLayoutUtils::LogTestDataForPaint(), make sure that wrapper checks
|
||||
// gfxPrefs::APZTestLoggingEnabled().
|
||||
|
Loading…
Reference in New Issue
Block a user