зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1501442 - Part 2: Propagate composition payload from clients to host. r=rhunt
--HG-- extra : rebase_source : 9053497a7a177855a8c5f1012a41e336b112c0a0
This commit is contained in:
Родитель
93c70bd2f6
Коммит
4cf5cf3ec0
|
@ -813,6 +813,17 @@ void CompositorBridgeParent::UpdatePaintTime(LayerTransactionParent* aLayerTree,
|
|||
mLayerManager->SetPaintTime(aPaintTime);
|
||||
}
|
||||
|
||||
void CompositorBridgeParent::RegisterPayload(
|
||||
LayerTransactionParent* aLayerTree,
|
||||
const InfallibleTArray<CompositionPayload>& aPayload) {
|
||||
// We get a lot of paint timings for things with empty transactions.
|
||||
if (!mLayerManager) {
|
||||
return;
|
||||
}
|
||||
|
||||
mLayerManager->RegisterPayload(aPayload);
|
||||
}
|
||||
|
||||
void CompositorBridgeParent::NotifyShadowTreeTransaction(
|
||||
LayersId aId, bool aIsFirstPaint, const FocusTarget& aFocusTarget,
|
||||
bool aScheduleComposite, uint32_t aPaintSequenceNumber,
|
||||
|
@ -1241,6 +1252,7 @@ void CompositorBridgeParent::ShadowLayersUpdated(
|
|||
mRefreshStartTime = aInfo.refreshStart();
|
||||
mTxnStartTime = aInfo.transactionStart();
|
||||
mFwdTime = aInfo.fwdTime();
|
||||
RegisterPayload(aLayerTree, aInfo.payload());
|
||||
|
||||
if (root) {
|
||||
SetShadowProperties(root);
|
||||
|
|
|
@ -133,6 +133,9 @@ class CompositorBridgeParentBase : public PCompositorBridgeParent,
|
|||
const nsTArray<ScrollableLayerGuid>& aTargets) = 0;
|
||||
virtual void UpdatePaintTime(LayerTransactionParent* aLayerTree,
|
||||
const TimeDuration& aPaintTime) {}
|
||||
virtual void RegisterPayload(
|
||||
LayerTransactionParent* aLayerTree,
|
||||
const InfallibleTArray<CompositionPayload>& aPayload) {}
|
||||
|
||||
ShmemAllocator* AsShmemAllocator() override { return this; }
|
||||
|
||||
|
@ -362,6 +365,9 @@ class CompositorBridgeParent final : public CompositorBridgeParentBase,
|
|||
|
||||
void UpdatePaintTime(LayerTransactionParent* aLayerTree,
|
||||
const TimeDuration& aPaintTime) override;
|
||||
void RegisterPayload(
|
||||
LayerTransactionParent* aLayerTree,
|
||||
const InfallibleTArray<CompositionPayload>& aPayload) override;
|
||||
|
||||
/**
|
||||
* Check rotation info and schedule a rendering task if needed.
|
||||
|
|
|
@ -625,6 +625,21 @@ void CrossProcessCompositorBridgeParent::UpdatePaintTime(
|
|||
state->mParent->UpdatePaintTime(aLayerTree, aPaintTime);
|
||||
}
|
||||
|
||||
void CrossProcessCompositorBridgeParent::RegisterPayload(
|
||||
LayerTransactionParent* aLayerTree,
|
||||
const InfallibleTArray<CompositionPayload>& aPayload) {
|
||||
LayersId id = aLayerTree->GetId();
|
||||
MOZ_ASSERT(id.IsValid());
|
||||
|
||||
CompositorBridgeParent::LayerTreeState* state =
|
||||
CompositorBridgeParent::GetIndirectShadowTree(id);
|
||||
if (!state || !state->mParent) {
|
||||
return;
|
||||
}
|
||||
|
||||
state->mParent->RegisterPayload(aLayerTree, aPayload);
|
||||
}
|
||||
|
||||
void CrossProcessCompositorBridgeParent::ObserveLayersUpdate(
|
||||
LayersId aLayersId, LayersObserverEpoch aEpoch, bool aActive) {
|
||||
MOZ_ASSERT(aLayersId.IsValid());
|
||||
|
|
|
@ -170,6 +170,8 @@ class CrossProcessCompositorBridgeParent final
|
|||
|
||||
void UpdatePaintTime(LayerTransactionParent* aLayerTree,
|
||||
const TimeDuration& aPaintTime) override;
|
||||
void RegisterPayload(LayerTransactionParent* aLayerTree,
|
||||
const InfallibleTArray<CompositionPayload>& aPayload) override;
|
||||
|
||||
PWebRenderBridgeParent* AllocPWebRenderBridgeParent(
|
||||
const wr::PipelineId& aPipelineId,
|
||||
|
|
Загрузка…
Ссылка в новой задаче