зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1519654. Implement CONTENT_FRAME_TIME_WITH_SVG for non-WebRender contains svg. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D16585 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
6d606d9ec5
Коммит
3d57a7f6a8
|
@ -243,6 +243,7 @@ class LayerManager : public FrameRecorder {
|
|||
mSnapEffectiveTransforms(true),
|
||||
mId(0),
|
||||
mInTransaction(false),
|
||||
mContainsSVG(false),
|
||||
mPaintedPixelCount(0) {}
|
||||
|
||||
/**
|
||||
|
@ -742,6 +743,8 @@ class LayerManager : public FrameRecorder {
|
|||
}
|
||||
void PayloadPresented();
|
||||
|
||||
void SetContainsSVG(bool aContainsSVG) { mContainsSVG = aContainsSVG; }
|
||||
|
||||
protected:
|
||||
RefPtr<Layer> mRoot;
|
||||
gfx::UserData mUserData;
|
||||
|
@ -763,6 +766,9 @@ class LayerManager : public FrameRecorder {
|
|||
|
||||
uint64_t mId;
|
||||
bool mInTransaction;
|
||||
|
||||
// Used for tracking CONTENT_FRAME_TIME_WITH_SVG
|
||||
bool mContainsSVG;
|
||||
// The time when painting most recently finished. This is recorded so that
|
||||
// we can time any play-pending animations from this point.
|
||||
TimeStamp mAnimationReadyTime;
|
||||
|
|
|
@ -696,7 +696,7 @@ void ClientLayerManager::ForwardTransaction(bool aScheduleComposite) {
|
|||
mPaintSequenceNumber, mIsRepeatTransaction,
|
||||
mTransactionIdAllocator->GetVsyncId(),
|
||||
mTransactionIdAllocator->GetVsyncStart(), refreshStart, mTransactionStart,
|
||||
mURL, &sent, mPayload);
|
||||
mContainsSVG, mURL, &sent, mPayload);
|
||||
|
||||
if (ok) {
|
||||
if (sent) {
|
||||
|
|
|
@ -393,7 +393,8 @@ void CrossProcessCompositorBridgeParent::ShadowLayersUpdated(
|
|||
|
||||
aLayerTree->SetPendingTransactionId(
|
||||
aInfo.id(), aInfo.vsyncId(), aInfo.vsyncStart(), aInfo.refreshStart(),
|
||||
aInfo.transactionStart(), endTime, aInfo.url(), aInfo.fwdTime());
|
||||
aInfo.transactionStart(), endTime, aInfo.containsSVG(), aInfo.url(),
|
||||
aInfo.fwdTime());
|
||||
}
|
||||
|
||||
void CrossProcessCompositorBridgeParent::DidCompositeLocked(
|
||||
|
|
|
@ -889,7 +889,7 @@ TransactionId LayerTransactionParent::FlushTransactionId(
|
|||
if (mId.IsValid() && mPendingTransaction.IsValid() && !mVsyncRate.IsZero()) {
|
||||
RecordContentFrameTime(mTxnVsyncId, mVsyncStartTime, mTxnStartTime, aId,
|
||||
aCompositeEnd, mTxnEndTime - mTxnStartTime,
|
||||
mVsyncRate, false, false);
|
||||
mVsyncRate, mContainsSVG, false);
|
||||
}
|
||||
|
||||
#if defined(ENABLE_FRAME_LATENCY_LOG)
|
||||
|
|
|
@ -76,7 +76,7 @@ class LayerTransactionParent final : public PLayerTransactionParent,
|
|||
const TimeStamp& aVsyncStartTime,
|
||||
const TimeStamp& aRefreshStartTime,
|
||||
const TimeStamp& aTxnStartTime,
|
||||
const TimeStamp& aTxnEndTime,
|
||||
const TimeStamp& aTxnEndTime, bool aContainsSVG,
|
||||
const nsCString& aURL,
|
||||
const TimeStamp& aFwdTime) {
|
||||
mPendingTransaction = aId;
|
||||
|
@ -85,6 +85,7 @@ class LayerTransactionParent final : public PLayerTransactionParent,
|
|||
mRefreshStartTime = aRefreshStartTime;
|
||||
mTxnStartTime = aTxnStartTime;
|
||||
mTxnEndTime = aTxnEndTime;
|
||||
mContainsSVG = aContainsSVG;
|
||||
mTxnURL = aURL;
|
||||
mFwdTime = aFwdTime;
|
||||
}
|
||||
|
@ -215,6 +216,7 @@ class LayerTransactionParent final : public PLayerTransactionParent,
|
|||
TimeStamp mTxnEndTime;
|
||||
TimeStamp mFwdTime;
|
||||
nsCString mTxnURL;
|
||||
bool mContainsSVG;
|
||||
|
||||
// When the widget/frame/browser stuff in this process begins its
|
||||
// destruction process, we need to Disconnect() all the currently
|
||||
|
|
|
@ -559,6 +559,7 @@ struct TransactionInfo
|
|||
TimeStamp vsyncStart;
|
||||
TimeStamp refreshStart;
|
||||
TimeStamp transactionStart;
|
||||
bool containsSVG;
|
||||
nsCString url;
|
||||
TimeStamp fwdTime;
|
||||
/* This provides some timing information on any content that is meant to be
|
||||
|
|
|
@ -531,8 +531,9 @@ bool ShadowLayerForwarder::EndTransaction(
|
|||
bool aIsRepeatTransaction, const mozilla::VsyncId& aVsyncId,
|
||||
const mozilla::TimeStamp& aVsyncStart,
|
||||
const mozilla::TimeStamp& aRefreshStart,
|
||||
const mozilla::TimeStamp& aTransactionStart, const nsCString& aURL,
|
||||
bool* aSent, const InfallibleTArray<CompositionPayload>& aPayload) {
|
||||
const mozilla::TimeStamp& aTransactionStart, bool aContainsSVG,
|
||||
const nsCString& aURL, bool* aSent,
|
||||
const InfallibleTArray<CompositionPayload>& aPayload) {
|
||||
*aSent = false;
|
||||
|
||||
TransactionInfo info;
|
||||
|
@ -677,6 +678,7 @@ bool ShadowLayerForwarder::EndTransaction(
|
|||
info.refreshStart() = aRefreshStart;
|
||||
info.transactionStart() = aTransactionStart;
|
||||
info.url() = aURL;
|
||||
info.containsSVG() = aContainsSVG;
|
||||
#if defined(ENABLE_FRAME_LATENCY_LOG)
|
||||
info.fwdTime() = TimeStamp::Now();
|
||||
#endif
|
||||
|
|
|
@ -256,7 +256,7 @@ class ShadowLayerForwarder final : public LayersIPCActor,
|
|||
const mozilla::TimeStamp& aVsyncTime,
|
||||
const mozilla::TimeStamp& aRefreshStart,
|
||||
const mozilla::TimeStamp& aTransactionStart,
|
||||
const nsCString& aURL, bool* aSent,
|
||||
bool aContainsSVG, const nsCString& aURL, bool* aSent,
|
||||
const InfallibleTArray<CompositionPayload>& aPayload =
|
||||
InfallibleTArray<CompositionPayload>());
|
||||
|
||||
|
|
|
@ -1661,6 +1661,14 @@ class FLBDisplayItemIterator : protected FlattenedDisplayItemIterator {
|
|||
}
|
||||
|
||||
const DisplayItemType type = mNext->GetType();
|
||||
|
||||
if (type == DisplayItemType::TYPE_SVG_WRAPPER) {
|
||||
// We mark SetContainsSVG for the CONTENT_FRAME_TIME_WITH_SVG metric
|
||||
if (RefPtr<LayerManager> lm = mBuilder->GetWidgetLayerManager()) {
|
||||
lm->SetContainsSVG(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (type != DisplayItemType::TYPE_OPACITY &&
|
||||
type != DisplayItemType::TYPE_TRANSFORM) {
|
||||
return true;
|
||||
|
|
|
@ -2560,6 +2560,8 @@ already_AddRefed<LayerManager> nsDisplayList::PaintRoot(
|
|||
if (aFlags & PAINT_USE_WIDGET_LAYERS) {
|
||||
layerManager = aBuilder->GetWidgetLayerManager(&view);
|
||||
if (layerManager) {
|
||||
layerManager->SetContainsSVG(false);
|
||||
|
||||
doBeginTransaction = !(aFlags & PAINT_EXISTING_TRANSACTION);
|
||||
widgetTransaction = true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче