Bug 1371114 - Add gecko profiler labels for WebRender, r=kats

MozReview-Commit-ID: 4TRZgV8X1Ml

--HG--
extra : rebase_source : 1152c3a1d3444ebf91d55b2e2de4f123e1139a7f
This commit is contained in:
peter chang 2017-06-09 11:56:13 +08:00
Родитель fe23e74717
Коммит c09bd44dec
3 изменённых файлов: 13 добавлений и 2 удалений

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

@ -9,6 +9,7 @@
#include "apz/src/AsyncPanZoomController.h"
#include "CompositableHost.h"
#include "gfxPrefs.h"
#include "GeckoProfiler.h"
#include "GLContext.h"
#include "GLContextProvider.h"
#include "mozilla/Range.h"
@ -312,6 +313,7 @@ WebRenderBridgeParent::HandleDPEnd(const gfx::IntSize& aSize,
const WrBuiltDisplayListDescriptor& dlDesc,
const WebRenderScrollData& aScrollData)
{
GeckoProfilerTracingRAII tracer("Paint", "DPTransaction");
UpdateFwdTransactionId(aFwdTransactionId);
AutoClearReadLocks clearLocks(mReadLocks);
@ -836,6 +838,7 @@ WebRenderBridgeParent::SampleAnimations(nsTArray<WrOpacityProperty>& aOpacityArr
void
WebRenderBridgeParent::CompositeToTarget(gfx::DrawTarget* aTarget, const gfx::IntRect* aRect)
{
GeckoProfilerTracingRAII tracer("Paint", "CompositeToTraget");
if (mPaused) {
return;
}

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

@ -6,6 +6,7 @@
#include "WebRenderLayerManager.h"
#include "gfxPrefs.h"
#include "GeckoProfiler.h"
#include "LayersLogging.h"
#include "mozilla/layers/CompositorBridgeChild.h"
#include "mozilla/layers/StackingContextHelper.h"
@ -179,6 +180,7 @@ WebRenderLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback
void* aCallbackData,
EndTransactionFlags aFlags)
{
GeckoProfilerTracingRAII tracer("Paint", "RenderLayers");
mPaintedLayerCallback = aCallback;
mPaintedLayerCallbackData = aCallbackData;
mTransactionIncomplete = false;
@ -226,7 +228,11 @@ WebRenderLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback
bool sync = mTarget != nullptr;
mLatestTransactionId = mTransactionIdAllocator->GetTransactionId();
WrBridge()->DPEnd(builder, size.ToUnknownSize(), sync, mLatestTransactionId, scrollData);
{
GeckoProfilerTracingRAII
tracer("Paint", sync ? "ForwardDPTransactionSync":"ForwardDPTransaction");
WrBridge()->DPEnd(builder, size.ToUnknownSize(), sync, mLatestTransactionId, scrollData);
}
MakeSnapshotIfRequired(size);
mNeedsComposite = false;

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

@ -3,6 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "base/task.h"
#include "GeckoProfiler.h"
#include "RenderThread.h"
#include "nsThreadUtils.h"
#include "mozilla/layers/CompositorThread.h"
@ -11,7 +13,6 @@
#include "mozilla/webrender/RendererOGL.h"
#include "mozilla/webrender/RenderTextureHost.h"
#include "mozilla/widget/CompositorWidget.h"
#include "base/task.h"
namespace mozilla {
namespace wr {
@ -178,6 +179,7 @@ NotifyDidRender(layers::CompositorBridgeParentBase* aBridge,
void
RenderThread::UpdateAndRender(wr::WindowId aWindowId)
{
GeckoProfilerTracingRAII tracer("Paint", "Composite");
MOZ_ASSERT(IsInRenderThread());
auto it = mRenderers.find(aWindowId);