Closed Bug 1316903 Opened 5 years ago Closed 5 years ago

Transaction-ify the webrender calls in WebrenderLayerManager

Categories

(Core :: Graphics: WebRender, defect, P3)

52 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox52 --- affected

People

(Reporter: kats, Assigned: mtseng)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

Now that the e10s integration is stood up, we should improve it to not be so sucky. One of the things that's bad right now is that when WebrenderLayerManager gets an EndTransaction call, it renders the layers and synchronously makes a bunch of IPDL calls over to the compositor which talks to WR. Instead, what we should do is "buffer" those calls on the client side and then just do one IPC call with all of the commands needed. This would be similar to a layer tree transaction, which accumulates a bunch of edits to the layer tree and sends it all together in one IPC call.

A second thing to do (and which we'll want long-term) is to turn the transaction into a "bag of bytes" that we can hand directly to webrender and have it unpack, rather than having to go through an extra C++ layer of code that "parses" the transaction and then makes the appropriate WR calls.
Priority: -- → P3
Whiteboard: [gfx-noted]
I'm making a very simple solution for this. See https://github.com/jrmuizel/gecko-dev/pull/53
Assignee: nobody → mtseng
Comment on attachment 8811567 [details] [diff] [review]
Merged many webrender commands to single transaction.

Review of attachment 8811567 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/wr/WebRenderBridgeChild.cpp
@@ +16,5 @@
>  {
>  }
>  
> +void
> +WebRenderBridgeChild::AddWebrenderCommand(const WebRenderCommand& aCmd)

s/Webrender/WebRender/ here and everywhere

::: gfx/layers/wr/WebRenderLayerManager.cpp
@@ +213,1 @@
>      return;

Mason is changing some of this in bug 1318100, so make sure you take a look at those changes (and rebase if needed)
Attachment #8811567 - Flags: review?(bugmail) → review+
See also Sotaro's changes in bug 1317893, to RecvDPEnd. Make sure you coordinate with him when landing.
Morris, you can land first than bug 1317893, if you want to land the patch today.
Flags: needinfo?(mtseng)
I think snapshot will be a standalone ipc call which means it doesn't integrated with this transaction. So I think Mason's change is ok.

Sotaro, I'll land this today. Thanks.
Flags: needinfo?(mtseng)
Blocks: 1317893
Pushed by mtseng@mozilla.com:
https://hg.mozilla.org/projects/graphics/rev/2cce2032c5c1
Merged many webrender commands to single transaction. r=kats
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.