Closed Bug 929362 Opened 11 years ago Closed 11 years ago

Off-main-thread CSS transform animation broken when animated box is larger than the viewport

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla27
blocking-b2g koi+
Tracking Status
firefox26 --- verified
firefox27 --- verified
b2g-v1.2 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

Attachments

(3 files)

Attached file testcase
STR:

1. Enable OMTA by setting layers.offmainthreadcomposition.async-animations to true.
2. Load the testcase.

You should see a rotating green box that rotates even when you don't move your mouse over the page or cause flushes in other ways.

The problem is that the AnimationManager throttles the main thread animation because it thinks that the animation can run on the compositor, but during layer building we refuse to set the animation on the layer because nsDisplayTransform::CanUseAsyncAnimations returns false due to the layer size, so the animation does not run on the compositor after all.
Comment on attachment 820202 [details] [diff] [review]
v1: When refusing OMTA during BuildLayer, set a property on the frame that disables all async animations on it forever

Review of attachment 820202 [details] [diff] [review]:
-----------------------------------------------------------------

r+ with that

::: layout/style/AnimationCommon.h
@@ +175,5 @@
>    CanAnimatePropertyOnCompositor(const dom::Element *aElement,
>                                   nsCSSProperty aProperty,
>                                   CanAnimateFlags aFlags);
>  
> +  static bool FrameRefusedAnimationOnCompositor(nsIFrame* aFrame);

Something starting with Is would be better. How about IsCompositorAnimationDisabledForFrame?
Attachment #820202 - Flags: review?(roc) → review+
Blocks: 925550
IsCompositorAnimationDisabledForFrame sounds good.

https://hg.mozilla.org/integration/mozilla-inbound/rev/c5c2519643e9
Blocks a koi? nomination.
blocking-b2g: --- → koi?
https://hg.mozilla.org/mozilla-central/rev/c5c2519643e9
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
blocking-b2g: koi? → koi+
No longer blocks: 925550
This will need an updated patch for aurora/koi uplift:

[/c/src-gecko/aurora]$ transplant c5c2519643e9
searching for changes
applying c5c2519643e9
patching file layout/generic/nsIFrame.h
Hunk #1 FAILED at 988
1 out of 1 hunks FAILED -- saving rejects to file layout/generic/nsIFrame.h.rej
patch failed to apply
Attached patch fix for auroraSplinter Review
Thank you :-)
(Had to had commit message; copied from the original commit)

remote:   https://hg.mozilla.org/releases/mozilla-aurora/rev/7d0eadd8576d
Keywords: verifyme
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
Mozilla/5.0 (X11; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:26.0) Gecko/20100101 Firefox/26.0

Verified as fixed on latest Aurora 26.0a2 (buildID: 20131028004004) and latest Nightly 27.0a1 (buildID: 20131028030205).
Status: RESOLVED → VERIFIED
Keywords: verifyme
Blocks: 936864
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: