Platform/GFX/OffMainThreadCompositing: Difference between revisions

From MozillaWiki
< Platform‎ | GFX
Jump to navigation Jump to search
Line 40: Line 40:
=Development=
=Development=


Experimental development is happening on a user repo: http://hg.mozilla.org/users/b56girard_gmail.com/kiwifox. m-c will be merged to kiwifox regularly however kiwifox will not merge with m-c. Patches should go through the regular review process on bugzilla and land on inbound. This user repo is simply for testing the patch integration before they are reviewed. Please push your changes to Try first and include 'try=<rev>'. Any change that regress test will be backed out immediately.
Experimental development is happening on a user repo: http://hg.mozilla.org/users/b56girard_gmail.com/kiwifox. m-c will be merged to kiwifox regularly; however, kiwifox will not merge with m-c. Patches should go through the regular review process on bugzilla and land on inbound. This user repo is simply for testing patch integration before patches are reviewed. Please push your changes to Try first and include 'try=<rev>'. Any change that regresses tests will be backed out immediately.


http://hg.mozilla.org/users/b56girard_gmail.com/kiwifox
http://hg.mozilla.org/users/b56girard_gmail.com/kiwifox

Revision as of 21:39, 30 November 2011

Current status

This work has just begun. We expect to complete the first phase (Android and OS X) in Q1, 2012.

Goals

The main goal is to improve responsiveness. In the longer term, goals include:

  • Asynchronous scrolling
  • Preventing tearing
  • Asynchronous video
  • Asynchronous CSS animation

Design

A new thread will handle composition. This thread will receive updates from the content thread, much as the chrome process receives updates from the content process in e10s. Indeed, as much as possible, the shadow layers machinery developed for e10s will be adapted for off-main-thread compositing. The design may need to diverge in some places from the e10s approach: for example, on Android, updates from the content thread to the compositing thread need to be asynchronous. (note: With the current code ... this might not be the case with the new frontend, and even in the current code, the cases that require async PLayers could be fixed at the widget/android level too. We'll need to make a tradeoff.)

Plan

Our highest priority platform for this project is Android. Since we expect that a significant portion of the desktop and mobile implementations will overlap, and since desktop development still proceeds more quickly than mobile development, we will actually develop the OS X implementation first, porting to Android as we go along.

Overview of our current plan:

  • Desktop implementation (OS X)
    • Setup compositing thread.
    • Get Gfx api working in the new thread.
      • Add/ensure thread safety (e.g. for Cairo).
    • Setup ITC protocol, and pass messages.
  • Mobile implementation
    • Port the desktop implementation to Android.
  • Other desktop platforms
    • Port the OS X implementation to Windows and Linux.

Tracking bug

The tracking bug is bug 598873. Tree view: [1]

Development

Experimental development is happening on a user repo: http://hg.mozilla.org/users/b56girard_gmail.com/kiwifox. m-c will be merged to kiwifox regularly; however, kiwifox will not merge with m-c. Patches should go through the regular review process on bugzilla and land on inbound. This user repo is simply for testing patch integration before patches are reviewed. Please push your changes to Try first and include 'try=<rev>'. Any change that regresses tests will be backed out immediately.

http://hg.mozilla.org/users/b56girard_gmail.com/kiwifox