@@ -76,16 +76,6 @@ void WebRenderBridgeChild::AddWebRenderParentCommand(
7676 mParentCommands .AppendElement (aCmd);
7777}
7878
79- void WebRenderBridgeChild::AddWebRenderParentDestroyCommand (
80- const WebRenderParentCommand& aCmd) {
81- mParentDestroyCommands .AppendElement (aCmd);
82- }
83-
84- void WebRenderBridgeChild::MergeWebRenderParentCommands () {
85- mParentCommands .AppendElements (std::move (mParentDestroyCommands ));
86- mParentDestroyCommands .Clear ();
87- }
88-
8979void WebRenderBridgeChild::BeginTransaction () {
9080 MOZ_ASSERT (!mDestroyed );
9181
@@ -124,9 +114,6 @@ bool WebRenderBridgeChild::EndTransaction(
124114
125115 TimeStamp fwdTime = TimeStamp::Now ();
126116
127- if (!aRenderOffscreen) {
128- MergeWebRenderParentCommands ();
129- }
130117 aDisplayListData.mCommands = std::move (mParentCommands );
131118 aDisplayListData.mIdNamespace = mIdNamespace ;
132119
@@ -164,7 +151,6 @@ void WebRenderBridgeChild::EndEmptyTransaction(
164151 TimeStamp fwdTime = TimeStamp::Now ();
165152
166153 if (aTransactionData) {
167- MergeWebRenderParentCommands ();
168154 aTransactionData->mCommands = std::move (mParentCommands );
169155 }
170156
@@ -189,8 +175,7 @@ void WebRenderBridgeChild::EndEmptyTransaction(
189175void WebRenderBridgeChild::ProcessWebRenderParentCommands () {
190176 MOZ_ASSERT (!mDestroyed );
191177
192- if (HasWebRenderParentCommands ()) {
193- MergeWebRenderParentCommands ();
178+ if (!mParentCommands .IsEmpty ()) {
194179 this ->SendParentCommands (mIdNamespace , mParentCommands );
195180 mParentCommands .Clear ();
196181 }
@@ -205,8 +190,7 @@ void WebRenderBridgeChild::AddPipelineIdForCompositable(
205190
206191void WebRenderBridgeChild::RemovePipelineIdForCompositable (
207192 const wr::PipelineId& aPipelineId) {
208- AddWebRenderParentDestroyCommand (
209- OpRemovePipelineIdForCompositable (aPipelineId));
193+ AddWebRenderParentCommand (OpRemovePipelineIdForCompositable (aPipelineId));
210194}
211195
212196wr::ExternalImageId WebRenderBridgeChild::GetNextExternalImageId () {
@@ -217,7 +201,7 @@ wr::ExternalImageId WebRenderBridgeChild::GetNextExternalImageId() {
217201}
218202
219203void WebRenderBridgeChild::ReleaseTextureOfImage (const wr::ImageKey& aKey) {
220- AddWebRenderParentDestroyCommand (OpReleaseTextureOfImage (aKey));
204+ AddWebRenderParentCommand (OpReleaseTextureOfImage (aKey));
221205}
222206
223207struct FontFileDataSink {
@@ -428,7 +412,7 @@ void WebRenderBridgeChild::RemoveTextureFromCompositable(
428412 return ;
429413 }
430414
431- AddWebRenderParentDestroyCommand (CompositableOperation (
415+ AddWebRenderParentCommand (CompositableOperation (
432416 aCompositable->GetIPCHandle (),
433417 OpRemoveTexture (WrapNotNull (aTexture->GetIPDLActor ()))));
434418}
0 commit comments