Closed Bug 771228 Opened 12 years ago Closed 10 years ago

Add OMTC tests on Desktop (Linux and Mac)

Categories

(Testing :: General, defect)

x86_64
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: nical, Unassigned)

References

Details

Off-main-thread compositing is a mode that changes a lot of things in the graphics pipeline.

OMTC is strongly affected by the use of Accelerated layers.

 * Fennec uses exclusively OMTC with accelerated layers, it works and it is the configuration in which tests are run.
 * b2g is a bit particular, lets forget about it for this bug

On desktop however:
 * On Mac OMTC + accelerated layers mostly works, not in release quality, and is turned off by default
 * On Linux OMTC + accelerated layers kinda works as well, has some bugs, off by default
 * On Windows OMTC is not implemented yet AFAIK

An important thing is that mobile platforms have less constraints than desktop with regard to OMTC, mainly because they don't need to handle several windows and non-accelerated layers. OMTC-related patches that work for mobile may break on desktop. 

On desktop the test suites are run without OMTC and without layers acceleration, So the few things that work in desktop OMTC tend to break pretty often.

So, it would be awesome to have tests that run on desktop with OMTC and accelerated layers. We know that on desktop, the current state of OMTC is not going to pass all the tests, but it is important to make sure that OMTC don't just crash when you create a new tab (and this sort of things), even if the result is not pixel-perfect.

Is it possible to mark a test as "we know it fails on Linux but if it segfaults that's unexpected and bad"?

If so, we could enable as many tests as possible, mark the ones that fails so that it does not show red all over the place, and fix the bugs one by one.

To Enable OMTC on Mac we just need to turn on the fowwlowing prefs:
 * layers.acceleration.force-enabled -> true
 * layers.offmainthreadcomposition.enabled -> true

On Linux, we need the prefs:
 * layers.acceleration.force-enabled -> true
 * layers.offmainthreadcomposition.enabled -> true
 * gfx.xrender.enabled -> false
AND also the environment variable MOZ_USE_OMTC
Blocks: 722012
> On Linux, we need the prefs:
>  * layers.acceleration.force-enabled -> true
>  * layers.offmainthreadcomposition.enabled -> true
>  * gfx.xrender.enabled -> false
> AND also the environment variable MOZ_USE_OMTC

oops! on Linux there is no layers.offmainthreadcomposition.enabled pref since it uses the environment variable instead.
(In reply to Nicolas Silva [:nical] from comment #1)
> oops! on Linux there is no layers.offmainthreadcomposition.enabled pref
> since it uses the environment variable instead.

IMHO, it's a pain that this is different between platforms, and AFAIK tests have a much easier time flipping prefs then setting env vars (but I could be mistaken there, other people probably know the test infra better than me).
(In reply to Robert Kaiser (:kairo@mozilla.com) from comment #2)
> (In reply to Nicolas Silva [:nical] from comment #1)
> > oops! on Linux there is no layers.offmainthreadcomposition.enabled pref
> > since it uses the environment variable instead.
> 
> IMHO, it's a pain that this is different between platforms, and AFAIK tests
> have a much easier time flipping prefs then setting env vars (but I could be
> mistaken there, other people probably know the test infra better than me).

I agree. I think this is a pain for everyone trying to work or test on OMTC-Linux. The problem is that to enable OMTC on Linux, we need to initialize X11 in thread-safe mode (by calling XInitThreads), and we need to do so before the first call to XOpenDisplay, which happens very early (before we can use libpref), hence the environment variable. We could always initialize with thread-safe X11, but this would have a cost. Bug 760228 is about always using XInitThreads, but it has not had much activity the last few months.
Is this bug still valid? Mac shipped OMTC, and I hope this has been regression-tested through automated tests ;)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.