
One thing to watch out for during review is that these new KnowsCompositor instances have their own serial (before that the media code would hold on to an actor directly so it would see the serial of WebRenderBridge or ImageBridge, or something else) so there is a potential change of behavior in that regard. Ideally we would be more explicit and pass a concrete struct to the media stuff instead of hiding it under KnowsCompositor, but my attempt at doing that bubbled up into a large refactoring so I turned to this instead. Splinter Review The idea is to have something that knows about the proper compositor backend oof the main thread without having to hold a strong reference to non-thread-safe actors like WebRenderBridgeChild, and at the same time provide access to the actor that will do the texture allocations (the ImageBridge in this case, hence the class being specific to media). I am hopeful that we can do the former because the latter needs a lot of changes.Īdd a media-specific KnowsCompositor proxy usable off the main thread (obsolete) Sotaro, am I missing something here? We should get the off-main-thread pieces of media code to only directly interact with the image bridge, either by providing all of the information it needs in the IBC or by providing it in some other thread-safe way. If we fail to create a renderer we fallback to a non-webrender backend for all widgets so it should be safe to ask the compositor backend to the ImageBridge, unless we plan to support having several compositor backends running at the same time that can receive video frames. On the other hand we don't support having several OMTC compositor backends at the same time. My understanding is that the DXVA manager asks the WebRenderBridgeChild rather than the ImageBridge about the backend because the former has a better chance of knowing the backend since it is tied to a specific compositor.

This is turning out to be a big and messy refactoring, so I am looking for an alternative solution.


I'm working on changing that by adding a atomic ref-counted object that contains the TextureFactoryIdentifier for the off-main-thread objects to hold on to.
