Closed Bug 1662827 Opened 4 years ago Closed 4 years ago

Remove the need for multiple channels on some WebRender threads

Categories

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

task

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: nical, Assigned: nical)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 3 obsolete files)

On the render backend and scene builder threads we have multiple channels. The main reason is that the both the api (webrender_api crate) and backend/scene (webrender crate) threads need to communicate with those, and a lot of the types in webrender internal messages can't move over to the api crate without dragging pretty much all of webrender.

The issue with having multiple channels in the event loops is that it makes it very hard to reason about the ordering of messages going going to the scene builder or directly to the render backend.

If the scene builder and render backend each had a single channel to receive message on we would get useful guarantees such as if message A is sent to the render backend before sending B to the scene builder, A is processed on the render backend before the render backend processes the result of B.

The motivation behind this change is to simplify a number of things:

  • Allow any internal webrender types in ApiMsg and SceneBuilderRequest.
  • As a result be able to ahve a single channel on the render backend an scene builder event loops.
  • And as a result get some ordering guarantees between messages sent to the scene builder and render backend.
  • Greatly simplify the message passing logic in WebRender thanks to all of the above and unblock sending messages directly to the scene builder thread.

Minor cleanup after merging webrender and webrender_api.

Depends on D89180

Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/40366bd1a0f7
Move the api senders to the webrender crate. r=gw
https://hg.mozilla.org/integration/autoland/rev/461e4e35a0e3
Use a single channel on the render backend thread. r=gw
https://hg.mozilla.org/integration/autoland/rev/25ef3ef3c69d
Use a single channel on the scene builder thread. r=gw
Attached file Bug 1662827 - Fix tileview build. (obsolete) —
Attachment #9174387 - Attachment is obsolete: true
Attachment #9173707 - Attachment is obsolete: true
Attachment #9173708 - Attachment is obsolete: true
Flags: needinfo?(nical.bugzilla)
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b1408e54551c
Move the api senders to the webrender crate. r=gw
https://hg.mozilla.org/integration/autoland/rev/7cafd404871f
Use a single channel on the render backend thread. r=gw
https://hg.mozilla.org/integration/autoland/rev/b003f8d0a290
Use a single channel on the scene builder thread. r=gw
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: