Bug 1464909 - Add GRAPHICS category annotations to async-paint-related methods. r?rhunt
MozReview-Commit-ID: HM2Gp85pCJa
--- a/gfx/layers/PaintThread.cpp
+++ b/gfx/layers/PaintThread.cpp
@@ -282,16 +282,18 @@ PaintThread::PrepareBuffer(CapturedBuffe
SyncRunnable::DispatchToThread(sThread, task);
#endif
}
void
PaintThread::AsyncPrepareBuffer(CompositorBridgeChild* aBridge,
CapturedBufferState* aState)
{
+ AUTO_PROFILER_LABEL("PaintThread::AsyncPrepareBuffer", GRAPHICS);
+
MOZ_ASSERT(IsOnPaintThread());
MOZ_ASSERT(aState);
if (!aState->PrepareBuffer()) {
gfxCriticalNote << "Failed to prepare buffers on the paint thread.";
}
if (aBridge->NotifyFinishedAsyncWorkerPaint(aState)) {
@@ -333,16 +335,18 @@ PaintThread::PaintContents(CapturedPaint
#endif
}
void
PaintThread::AsyncPaintContents(CompositorBridgeChild* aBridge,
CapturedPaintState* aState,
PrepDrawTargetForPaintingCallback aCallback)
{
+ AUTO_PROFILER_LABEL("PaintThread::AsyncPaintContents", GRAPHICS);
+
MOZ_ASSERT(IsOnPaintThread());
MOZ_ASSERT(aState);
DrawTarget* target = aState->mTargetDual;
DrawTargetCapture* capture = aState->mCapture;
Matrix oldTransform = target->GetTransform();
bool oldPermitsSubpixelAA = target->GetPermitSubpixelAA();
@@ -405,16 +409,18 @@ PaintThread::PaintTiledContents(Captured
SyncRunnable::DispatchToThread(mPaintWorkers, task);
#endif
}
void
PaintThread::AsyncPaintTiledContents(CompositorBridgeChild* aBridge,
CapturedTiledPaintState* aState)
{
+ AUTO_PROFILER_LABEL("PaintThread::AsyncPaintTiledContents", GRAPHICS);
+
MOZ_ASSERT(IsOnPaintWorkerThread());
MOZ_ASSERT(aState);
for (auto& copy : aState->mCopies) {
copy.CopyBuffer();
}
for (auto& clear : aState->mClears) {
--- a/gfx/layers/client/ClientLayerManager.cpp
+++ b/gfx/layers/client/ClientLayerManager.cpp
@@ -488,16 +488,18 @@ ClientLayerManager::GetCompositorBridgeC
return CompositorBridgeChild::Get();
}
return GetRemoteRenderer();
}
void
ClientLayerManager::FlushAsyncPaints()
{
+ AUTO_PROFILER_LABEL("ClientLayerManager::FlushAsyncPaints", GRAPHICS);
+
CompositorBridgeChild* cbc = GetCompositorBridgeChild();
if (cbc) {
cbc->FlushAsyncPaints();
}
}
void
ClientLayerManager::ScheduleComposite()