Closed Bug 1211109 Opened 6 years ago Closed 6 years ago

Remove the static LayersBackend in CompositorParent


(Core :: Graphics: Layers, defect)

40 Branch
Not set



Tracking Status
firefox44 --- fixed


(Reporter: dvander, Assigned: dvander)




(4 files)

This thing is just trouble. The compositor can change for any number of reasons, so either we have to enforce that it can't, or just accept that it can and support it. Anyone interacting with the compositor should know what kind of compositor they'll have.

In practice the only transitions we make are D3D11 -> Basic and back, if for example a D3D11 call transiently fails or if a TDR occurs. We should still not be mixing D3D9/D3D11 or anything crazy like that.
Motivation for this is that CompositorD3D11::Initialize seems to have a non-zero probability of failing. If that does happen it'd be nice to know exactly why it failed.
Attachment #8669285 - Flags: review?(matt.woodrow)
Most of this is forwarding a new LayersBackend parameter around anywhere we create a Texture in IPDL, since ImageBridgeParent is not 1:1 with CompositorParents.

I would like to have removed ISurfaceAllocator::GetCompositorBackendType too. It looks possible, but TextureClient::CreateForDrawing consumers would need to know a bit more. For now I just commented that GetCompositorBackendType is intended for TextureClient::CreateForDrawing.
Attachment #8669287 - Flags: review?(matt.woodrow)
This removes the thebes assertion that the compositor doesn't change, and replaces it with a critical note. We now also only notify thebes of a compositor change for top-level windows.
Attachment #8669288 - Flags: review?(matt.woodrow)
Attachment #8669285 - Flags: review?(matt.woodrow) → review+
Attachment #8669287 - Flags: review?(matt.woodrow) → review+
Attachment #8669288 - Flags: review?(matt.woodrow) → review+
It's illegal to call this for anything other than CompositableForwarder, so we may as well remove it and have consumers take in a CompositableForwarder instead.

(If this results in something unintentional, I can change affected code to pass around a LayersBackend instead.)
Attachment #8670074 - Flags: review?(matt.woodrow)
Attachment #8670074 - Flags: review?(matt.woodrow) → review+
You need to log in before you can comment on or make changes to this bug.