зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1459714 - Make WebRenderBridgeParent::ProcessWebRenderParentCommands callers provide the transaction. r=sotaro
MozReview-Commit-ID: FIrA11wgjLI --HG-- extra : rebase_source : ef6db14c097948ac2949148693167f29dfd72f14
This commit is contained in:
Родитель
b613e3c213
Коммит
c684d376e0
|
@ -618,9 +618,10 @@ WebRenderBridgeParent::RecvSetDisplayList(const gfx::IntSize& aSize,
|
|||
|
||||
mAsyncImageManager->SetCompositionTime(TimeStamp::Now());
|
||||
|
||||
ProcessWebRenderParentCommands(aCommands);
|
||||
|
||||
wr::TransactionBuilder txn;
|
||||
ProcessWebRenderParentCommands(aCommands, txn);
|
||||
mApi->SendTransaction(txn);
|
||||
|
||||
if (!UpdateResources(aResourceUpdates, aSmallShmems, aLargeShmems, txn)) {
|
||||
return IPC_FAIL(this, "Failed to deserialize resource updates");
|
||||
}
|
||||
|
@ -708,7 +709,9 @@ WebRenderBridgeParent::RecvEmptyTransaction(const FocusTarget& aFocusTarget,
|
|||
|
||||
if (!aCommands.IsEmpty()) {
|
||||
mAsyncImageManager->SetCompositionTime(TimeStamp::Now());
|
||||
ProcessWebRenderParentCommands(aCommands);
|
||||
wr::TransactionBuilder txn;
|
||||
ProcessWebRenderParentCommands(aCommands, txn);
|
||||
mApi->SendTransaction(txn);
|
||||
ScheduleGenerateFrame();
|
||||
}
|
||||
|
||||
|
@ -751,14 +754,16 @@ WebRenderBridgeParent::RecvParentCommands(nsTArray<WebRenderParentCommand>&& aCo
|
|||
if (mDestroyed) {
|
||||
return IPC_OK();
|
||||
}
|
||||
ProcessWebRenderParentCommands(aCommands);
|
||||
wr::TransactionBuilder txn;
|
||||
ProcessWebRenderParentCommands(aCommands, txn);
|
||||
mApi->SendTransaction(txn);
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
void
|
||||
WebRenderBridgeParent::ProcessWebRenderParentCommands(const InfallibleTArray<WebRenderParentCommand>& aCommands)
|
||||
WebRenderBridgeParent::ProcessWebRenderParentCommands(const InfallibleTArray<WebRenderParentCommand>& aCommands,
|
||||
wr::TransactionBuilder& aTxn)
|
||||
{
|
||||
wr::TransactionBuilder txn;
|
||||
for (InfallibleTArray<WebRenderParentCommand>::index_type i = 0; i < aCommands.Length(); ++i) {
|
||||
const WebRenderParentCommand& cmd = aCommands[i];
|
||||
switch (cmd.type()) {
|
||||
|
@ -771,7 +776,7 @@ WebRenderBridgeParent::ProcessWebRenderParentCommands(const InfallibleTArray<Web
|
|||
}
|
||||
case WebRenderParentCommand::TOpRemovePipelineIdForCompositable: {
|
||||
const OpRemovePipelineIdForCompositable& op = cmd.get_OpRemovePipelineIdForCompositable();
|
||||
RemovePipelineIdForCompositable(op.pipelineId(), txn);
|
||||
RemovePipelineIdForCompositable(op.pipelineId(), aTxn);
|
||||
break;
|
||||
}
|
||||
case WebRenderParentCommand::TOpAddExternalImageIdForCompositable: {
|
||||
|
@ -825,7 +830,6 @@ WebRenderBridgeParent::ProcessWebRenderParentCommands(const InfallibleTArray<Web
|
|||
}
|
||||
}
|
||||
}
|
||||
mApi->SendTransaction(txn);
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
|
|
|
@ -210,7 +210,8 @@ private:
|
|||
void RemoveExternalImageId(const ExternalImageId& aImageId);
|
||||
|
||||
LayersId GetLayersId() const;
|
||||
void ProcessWebRenderParentCommands(const InfallibleTArray<WebRenderParentCommand>& aCommands);
|
||||
void ProcessWebRenderParentCommands(const InfallibleTArray<WebRenderParentCommand>& aCommands,
|
||||
wr::TransactionBuilder& aTxn);
|
||||
|
||||
void ClearResources();
|
||||
uint64_t GetChildLayerObserverEpoch() const { return mChildLayerObserverEpoch; }
|
||||
|
|
Загрузка…
Ссылка в новой задаче