Out-of-process Compositing (GPU Process, Phase 1) - https://bugzilla.mozilla.org/show_bug.cgi?id=1264543
----------------------------------------
Objective: Enable compositing from a separate GPU process. The outcome of this work is that hardware-accelerated compositing should be isolated from the browser UI process, such that if hardware-accelerated composition causes a crash, content and UI can be repainted without user intervention or interruption.
People: David Anderson, George Wright, Ryan Hunt. Consulting: Matt Woodrow, Kartikya Gupta, Mason Chang, Jim Matthies, Markus Stange, Bill McCloskey, Benjamin Smedberg.
Steps: See implementation notes. Roughly half the work is isolating and building proxies around code that will move from in-process and out-of-process, and the other half is adding new code for the GPU process.
ETA: Nightly, mid-October.
Risks:
- APZ is an unknown, there are open questions as to how to handle input events when the GPU process crashes.
- Startup/first-paint regressions are a possibility.
- Full benefit comes with disabling d2d in the UI process, this needs to be measured.
- Can't use D3D11 on older versions of Windows 7; have to make product call on whether or not to disable the process, or use D3D9.
Implementation
- Widget Proxies
- What: Objects that allow both in-process and out-of-process compositors to composite to a window.
- Dependencies: None
- Work:
Develop a Windows-compatible proxy. (bug 1265975)Remove D3D11/D3D9 compositor access to widget. (bug 1265975)- Develop a Mac-compatible proxy. (bug 1271870)
- Requires an additional compositing model for Mac; see bug 1271870.
- Remove OGL compositor access to widget.
- Owner: msteng (mac/ogl)
CompositorBridge ProxiesWhat: Proxy non-compositor-thread access to CompositorBridgeParent.Dependencies: NoneWork:Remove widget access via CompositorSession abstraction (bug 1272472)Remove DOM access via GPUProcessManager abstraction (bug 1274149)
Time: 2 weeksOwner: dvander
GPU Process SkeletonWhat: Add minimum code to launch a GPU process. (bug 1271180)Dependencies: NoneWork:IPDL boilerplateCrashreporter integrationTelemetry integrationShutdown boilerplategfxConfig hook-up
Time: 2 weeksOwner: dvander
- Create GPU Process Compositor
What: Enable compositing via the GPU process.Dependencies: Widget Proxies, CBP Proxies, GPU Process SkeletonWork:Split gfxPlatform into pieces Compositor needs (bug 1282364)Refactor gfxPrefs for GPU ProcessAdd a new RemoteCompositorSession implementation. (bug 1282348)Bridge content processes to the GPU process.
Add IPDL glue for widget proxies. (bug 1281998)Add IPDL glue for vsync dispatch. (bug 1285625)New: Add support for PImageBridge (bug 1287366)New: Add support for PVRManager. (bug 1287597)New: Content sandbox compatibility. (bug 1287984, bug 1289895)
Time: 4-6 weeksOwner: dvander
Enable Async Pan/ZoomWhat: Enable async pan/zoom in the GPU process.Dependencies: CBP proxies, some of GPU Process Compositor.Work:Develop wrapper class for widget/DOM APZCTreeManager calls. (bug 1281575)Expose IPDL version of wrapper through RemoteCompositorSession. (bug 1281575)Hook up RemoteContentController for chrome.Enable in GPU process. (bug 1298245)
Time: 3-4 weeksOwner: rhunt
- Restarts
- What: Seamless restarting of GPU process on failure (bug 1297251)
- Dependencies: GPU Process Compositor
- Work:
Notify children to recreate rendering stack:CompositorBridgeImageBridge
Re-create in-process after N attempts.Clean up gfxCriticalError/MOZ_ASSERTs- Telemetry for failures.
- Device resets.
- Time: 4-6 weeks
- Owner: dvander
- Polish
- What: Polish items for shipping.
- Dependencies: All of the above
- Work:
- Platform viability checks (bug 1297822)
- about:support messaging (bug 1297792)
- Telemetry (bug 1297790, bug 1304494)
IPDL error handling (bug 1297826)gfxCriticalError support (bug 1297828)- Crash reporter integration (bug 1297843)
- Sandboxing
- Miscellanious:
- Test content shutdown
- Only use GPU process for acceleration?
- Test that plugins work
- Talos performance tests
- Time: 4-6 weeks
- Follow-up Work
Disabling D2D in the E10S parent processes - no dependencies. (bug 1294986)