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:

Implementation
  1. Widget Proxies
    1. What: Objects that allow both in-process and out-of-process compositors to composite to a window.
    2. Dependencies: None
    3. Work:
      1. Develop a Windows-compatible proxy. (bug 1265975)
      2. Remove D3D11/D3D9 compositor access to widget. (bug 1265975)
      3. Develop a Mac-compatible proxy. (bug 1271870)
        1. Requires an additional compositing model for Mac; see bug 1271870.
      4. Remove OGL compositor access to widget.
    4. Owner: msteng (mac/ogl)
  2. CompositorBridge Proxies
    1. What: Proxy non-compositor-thread access to CompositorBridgeParent.
    2. Dependencies: None
    3. Work:
      1. Remove widget access via CompositorSession abstraction (bug 1272472)
      2. Remove DOM access via GPUProcessManager abstraction (bug 1274149)
    4. Time: 2 weeks
    5. Owner: dvander
  3. GPU Process Skeleton
    1. What: Add minimum code to launch a GPU process. (bug 1271180)
    2. Dependencies: None
    3. Work:
      1. IPDL boilerplate
      2. Crashreporter integration
      3. Telemetry integration
      4. Shutdown boilerplate
      5. gfxConfig hook-up
    4. Time: 2 weeks
    5. Owner: dvander
  4. Create GPU Process Compositor
    1. What: Enable compositing via the GPU process.
    2. Dependencies: Widget Proxies, CBP Proxies, GPU Process Skeleton
    3. Work:
      1. Split gfxPlatform into pieces Compositor needs (bug 1282364)
      2. Refactor gfxPrefs for GPU Process
      3. Add a new RemoteCompositorSession implementation. (bug 1282348)
        1. Bridge content processes to the GPU process.
      4. Add IPDL glue for widget proxies. (bug 1281998)
      5. Add IPDL glue for vsync dispatch. (bug 1285625)
      6. New: Add support for PImageBridge (bug 1287366)
      7. New: Add support for PVRManager. (bug 1287597)
      8. New: Content sandbox compatibility. (bug 1287984, bug 1289895)
    4. Time: 4-6 weeks
    5. Owner: dvander
  5. Enable Async Pan/Zoom
    1. What: Enable async pan/zoom in the GPU process.
    2. Dependencies: CBP proxies, some of GPU Process Compositor.
    3. Work:
      1. Develop wrapper class for widget/DOM APZCTreeManager calls. (bug 1281575)
      2. Expose IPDL version of wrapper through RemoteCompositorSession. (bug 1281575)
      3. Hook up RemoteContentController for chrome.
      4. Enable in GPU process. (bug 1298245)
    4. Time: 3-4 weeks
    5. Owner: rhunt
  6. Restarts
    1. What: Seamless restarting of GPU process on failure (bug 1297251)
    2. Dependencies: GPU Process Compositor
    3. Work:
      1. Notify children to recreate rendering stack:
        1. CompositorBridge
        2. ImageBridge
      2. Re-create in-process after N attempts.
      3. Clean up gfxCriticalError/MOZ_ASSERTs
      4. Telemetry for failures.
      5. Device resets.
    4. Time: 4-6 weeks
    5. Owner: dvander
  7. Polish
    1. What: Polish items for shipping.
    2. Dependencies: All of the above
    3. Work:
      1. Platform viability checks (bug 1297822)
      2. about:support messaging (bug 1297792)
      3. Telemetry (bug 1297790, bug 1304494)
      4. IPDL error handling (bug 1297826)
      5. gfxCriticalError support (bug 1297828)
      6. Crash reporter integration (bug 1297843)
      7. Sandboxing
      8. Miscellanious:
        1. Test content shutdown
        2. Only use GPU process for acceleration?
        3. Test that plugins work
        4. Talos performance tests
    4. Time: 4-6 weeks
  8. Follow-up Work
    1. Disabling D2D in the E10S parent processes - no dependencies. (bug 1294986)