Bug 1783020 - Record WebRender display list building time in PerfStats. r=bas
This repurposes the unused LayerBuilding stat. Differential Revision: https://phabricator.services.mozilla.com/D153631
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
#include "mozilla/layers/TransactionIdAllocator.h"
|
#include "mozilla/layers/TransactionIdAllocator.h"
|
||||||
#include "mozilla/layers/WebRenderBridgeChild.h"
|
#include "mozilla/layers/WebRenderBridgeChild.h"
|
||||||
#include "mozilla/layers/UpdateImageHelper.h"
|
#include "mozilla/layers/UpdateImageHelper.h"
|
||||||
|
#include "mozilla/PerfStats.h"
|
||||||
#include "nsDisplayList.h"
|
#include "nsDisplayList.h"
|
||||||
#include "nsLayoutUtils.h"
|
#include "nsLayoutUtils.h"
|
||||||
#include "WebRenderCanvasRenderer.h"
|
#include "WebRenderCanvasRenderer.h"
|
||||||
@@ -455,6 +456,13 @@ void WebRenderLayerManager::EndTransactionWithoutLayer(
|
|||||||
? wr::GeckoDisplayListType::Full(aGeckoDLBuildTime)
|
? wr::GeckoDisplayListType::Full(aGeckoDLBuildTime)
|
||||||
: wr::GeckoDisplayListType::Partial(aGeckoDLBuildTime);
|
: wr::GeckoDisplayListType::Partial(aGeckoDLBuildTime);
|
||||||
|
|
||||||
|
// convert from nanoseconds to microseconds
|
||||||
|
auto duration = TimeDuration::FromMicroseconds(
|
||||||
|
double(dlData.mDLDesc.builder_finish_time -
|
||||||
|
dlData.mDLDesc.builder_start_time) /
|
||||||
|
1000.);
|
||||||
|
PerfStats::RecordMeasurement(PerfStats::Metric::WrDisplayListBuilding,
|
||||||
|
duration);
|
||||||
bool ret = WrBridge()->EndTransaction(
|
bool ret = WrBridge()->EndTransaction(
|
||||||
std::move(dlData), mLatestTransactionId, containsSVGGroup,
|
std::move(dlData), mLatestTransactionId, containsSVGGroup,
|
||||||
mTransactionIdAllocator->GetVsyncId(),
|
mTransactionIdAllocator->GetVsyncId(),
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#define FOR_EACH_PERFSTATS_METRIC(MACRO) \
|
#define FOR_EACH_PERFSTATS_METRIC(MACRO) \
|
||||||
MACRO(DisplayListBuilding) \
|
MACRO(DisplayListBuilding) \
|
||||||
MACRO(Rasterizing) \
|
MACRO(Rasterizing) \
|
||||||
MACRO(LayerBuilding) \
|
MACRO(WrDisplayListBuilding) \
|
||||||
MACRO(LayerTransactions) \
|
MACRO(LayerTransactions) \
|
||||||
MACRO(Compositing) \
|
MACRO(Compositing) \
|
||||||
MACRO(Reflowing) \
|
MACRO(Reflowing) \
|
||||||
|
|||||||
Reference in New Issue
Block a user