Currently on Linux our only 'supported' graphics backend is the
main-thread software backend (basic layers). It is possible to use the
main-thread OpenGL backend using the 'layers.acceleration.force-enabled'
pref, and to use OpenGL with off-main-thread compositing using that pref
and 'layers.offmainthreadcomposition.enabled'. The former works pretty
well, if your drivers are cooperative, the latter has some issues (see
the list of bugs blocking bug 722012 for details) and requires the same
cooperative drivers as main-thread.
Our goal is (basically) to be OMTC everywhere (all backends, all
platforms) and remove (nearly) all of our main thread compositing code.
We would like to remove the main thread OpenGL code (bug 924403). Long
term, keeping it is not an option. We would like to remove it now
because it is making other graphics work much more difficult. The only
platform where this is an issue is Linux (all other platforms which
support OpenGL are already using OMTC).
Some things that make this interesting:
1) Software OMTC is not ready yet (bug 865104), it is not likely to be
ready _very_ soon, but it shouldn't be too long either (I would guess a
couple of months).
2) Unlike other platforms, OMTC on Linux requires an environment
variable (MOZ_USE_OMTC or MOZ_OMTC_ENABLED) which determines if we
initialise X for multiple threads
(http://dxr.mozilla.org/mozilla-central/source/toolkit/xre/nsAppRunner.cpp#l3480).
We have to do this early in startup which is why we can't use a pref.
This has a performance impact for all users (whether they get OMTC or
not) of ~5%.
3) For nightly users, we initialise X for multiple threads in any case
so that e10s works.
4) We do not want (non-nightly) users who do not use OMTC to pay the
cost of multi-threaded X.
5) We would love to spend time making OMTC OpenGL on Linux work
perfectly, but it is not a priority for the graphics team due to the low
number of users. We always hope to get community involvment here, but it
has been patchy in the past. (OMTC OpenGL on Mac, Android, and Firefox
OS works well and is the platform default).
After removing MT OGL, our proposal is that Linux users on nightly or
who manually set MOZ_USE_OMTC will get OMTC OpenGL. That means they will
get the same(-ish) performance, but a possibly worse experience. Other
Linux users will get main thread basic layers, whether they force on HWA
or not. Their performance will be degraded (sometimes), but the rest of
the experience should not (this is the current default configuration for
Linux). (To clarify, we will let this change ride the trains, so when I
say non-nightly users, that will be after the relevant uplift).
In the long term, OMTC basic layers will be the default for Linux and
forcing HWA will give OpenGL OMTC as expected. The environment variable
will be un-necessary because we will always initialise X for multiple
threads.
So, does anyone have any objections to this plan? Or ways we could do
this better? If you use HWA please be aware of these changes and report
any bugs you find. And a heads up that we might be seeing a few bugs
filed around this by users when it happens and at subsequent uplifts.
Thanks, Nick
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform