Closed Bug 1523625 Opened 5 years ago Closed 5 years ago

dom/base/test/test_domwindowutils.html | Opacity animation should run on the compositor

Categories

(GeckoView :: General, defect, P1)

Unspecified
All
defect

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: birtles)

References

Details

Attachments

(1 file)

Summary: Intermittent dom/base/test/test_domwindowutils.html | Opacity animation should run on the compositor → dom/base/test/test_domwindowutils.html | Opacity animation should run on the compositor

Brian, do you have ideas on this? It only seems to happen with GeckoView/e10s.

Flags: needinfo?(bbirtles)

I don't see anything at a glance. The times in the log look good, i.e. it's not that the animation runs to completion before we check the flag (on the contrary, it's more likely we're querying the flag too soon--but that too seems unlikely given that we're waiting on the ready promise). That flag gets set on the main thread though so it shouldn't depend on the compositor process.

I made up a similar test case to check that opacity animations like this are in fact running on the compositor under the Reference Browser and inspecting the animation using DevTools it appears that they are:

https://gist.githack.com/birtles/eecfde217441e936a4c73bcbf094877e/raw/cbf8927af892e99336f5683867be9b1b16f17c9b/opacity.html

Perhaps we can do a try run with paint listener debugging turned on for this test.

Hiro wrote this test so maybe he has ideas too.

The other thing we can do is dump the output of JSON.stringify(SpecialPowers.wrap(animation.effect).getProperties()) to see if there is any particular performance warning we're hitting.

As per the try result, this is not a perma failure, we probably need to make sure the animation is sent to the compositor just like we do with waitForAnimationReadyToRestyle() in testcommon.js.

Ok great. Here is a try run with some logging:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=e5e98571eb4b978d658e9b9eccd8bd9d8eaf19a1

And another one with waitForAnimationReadyToRestyle():

https://treeherder.mozilla.org/#/jobs?repo=try&revision=c34c9013395796ea4db769e3449c0396ad8b2803

(I haven't tried either locally so hopefully they run)

Actual try run with tests enabled (thanks Hiro for pointing that out!):

https://treeherder.mozilla.org/#/jobs?repo=try&revision=0993c94fb7f5a3fb10445e22618f774df510f81b

Assignee: nobody → bbirtles
Status: NEW → ASSIGNED
Flags: needinfo?(bbirtles)

This test was failing intermittently on GeckoView e10s. The
waitForAnimationReadyToRestyle helper works around certain cases where, due to
vsync, the animation ends up starting at exactly the same frame time as when it
was created meaning that restyling may not get triggered and hence we won't have
a chance to send it to the compositor.

It's not clear why this happens more frequently on GeckoView e10s but this seems
to fix the failures anyway.

Pushed by bbirtles@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5ba76bec7111
Wait until the animation is on the compositor before testing if it is; r=hiro

Do you think this may explain some of the test_restyles failures as well? Do we need a similar fix there?

Flags: needinfo?(bbirtles)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67

(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #10)

Do you think this may explain some of the test_restyles failures as well? Do we need a similar fix there?

It's plausible. But the place that the test fails is after calling pause(), it should be fairly cheap (given that we've never seen such failures on Fennec). So I am wondering GeckoView is more slower than Fennec?. It's worrisome. Anyway, we should add await waitForAnimationReadyToRestyle(animation) after the pause().

Flags: needinfo?(bbirtles)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: