b3831779e4d13b88ff696c92404d6f2b08157c17: Bug 1232577 part 18 - Drop RestyleManager::mLastUpdateForThrottledAnimations; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:55 +0900 - rev 321321
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 18 - Drop RestyleManager::mLastUpdateForThrottledAnimations; r=heycam
RestyleManager currently has a piece of state for tracking if throttled
animations are up-to-date or not. Actually, it's not so much about throttled
animations but really about outstanding changes to animation styles (which
is typically expected to be due to throttling animations but there are
other cases that invalidate the animation style rule that we should be
considering here).
We now have that same information stored in the EffectCompositor so we can
remove the redundant state from RestyleManager. Furthermore, the state stored
in EffectCompositor is more accurate since it captures the case when animation
style needs to be updated twice within a tick, or when nothing needs to be
updated within a tick.
This patch, therefore, introduces EffectCompositor::HasPendingStyleUpdates in
place of setting RestyleManager::mLastUpdateForThrottledAnimations.
nsTransitionManager also uses mLastUpdateForThrottledAnimations to warn if we
have not processed throttled animations. We can't use HasPendingStyleUpdates
here however, since it will return true in the case where we have triggered new
transitions in the process of restyling. However, any new transitions will
trigger "standard" (i.e. not throttled) restyles so we introduce another
method, HasThrottledStyleUpdates, that returns true only if we have outstanding
throttled updates and use this for the warning inside nsTransitionManager.
50cc47215375880d35e52f5e7226b00b15fd50d8: Bug 1232577 part 17 - Move AddStyleUpdatesTo to EffectCompositor; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:55 +0900 - rev 321320
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 17 - Move AddStyleUpdatesTo to EffectCompositor; r=heycam
9ffa5c570547c52effe3948e7095e87fba378699: Bug 1232577 part 16 - Move GetAnimationRule to EffectCompositor; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:55 +0900 - rev 321319
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 16 - Move GetAnimationRule to EffectCompositor; r=heycam
d3abdd12484da9d9d200c09abe926ab6599aaa2b: Bug 1232577 part 15 - Drop LastStyleUpdateForAllAnimations flag from pres context; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:55 +0900 - rev 321318
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 15 - Drop LastStyleUpdateForAllAnimations flag from pres context; r=heycam
nsPresContext contains a mLastStyleUpdateForAllAnimations flag which is simply
used to prevent unnecessarily posting restyles when throttled animations are
already up to date. Since part 13 we now accurately record whether we have
posted a restyle for each throttled animation and only post a restyle if we
have not done so already. As a result, this flag is no longer needed since
calling PostRestyleForThrottledAnimations is effectively a noop when throttled
animations are up-to-date.
ddfdec87e4488578497c0e20b998a2c6c4babb91: Bug 1232577 part 14 - Move FlushAnimations to EffectCompositor; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:55 +0900 - rev 321317
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 14 - Move FlushAnimations to EffectCompositor; r=heycam
69236594a8efb2f16e9369ae5e1964bb97a1bd55: Bug 1232577 part 13 - Move EnsureStyleRuleFor from AnimationCollection to EffectCompositor
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:55 +0900 - rev 321316
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 13 - Move EnsureStyleRuleFor from AnimationCollection to EffectCompositor
04ea9a6a29a545149380b1ace53211830a5c6f4c: Bug 1232577 part 12 - Move the remainder of RequestRestyle from AnimationCollection to EffectCompositor; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:54 +0900 - rev 321315
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 12 - Move the remainder of RequestRestyle from AnimationCollection to EffectCompositor; r=heycam
This also allows us to remove all references to AnimationCollection and the
animation managers from Animation.
697caeac54f5348043e47acda98a01900de4b592: Bug 1232577 part 11 - Remove AnimationCollection::mHasPendingAnimationRestyle; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:54 +0900 - rev 321314
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 11 - Remove AnimationCollection::mHasPendingAnimationRestyle; r=heycam
This flag is no longer needed since the same information is tracked in the
hashmap stored on EffectSet.
f6fcc3f908c05e1dc5029e82c7ab5463c943633d: Bug 1232577 part 10 - Remove AnimationCollection::mStyleChanging; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:54 +0900 - rev 321313
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 10 - Remove AnimationCollection::mStyleChanging; r=heycam
This flag is no longer needed because in
bug 1232563 we introduced a more
thorough optimization that detects when the animation is not changing by
comparing the progress value between samples and avoids requesting restyles
when it does not change.
35725757afce1a57cac0d7ab89f049ba3eb0b602: Bug 1232577 part 9 - Remove AnimationCollection::mStyleRuleRefreshTime; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:54 +0900 - rev 321312
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 9 - Remove AnimationCollection::mStyleRuleRefreshTime; r=heycam
Now that we track whether or not animations are up to date using the hashset in
EffectCompositor, we can remove the mStyleRuleRefreshTime flag that is, as of
part 5 of this patch series, now only used for detecting whether or not
animations are up to date.
In order to preserve the existing behavior of FlushAnimations, however, this
patch temporarily introduces a method to indicate if there are throttled
animations or not.
It might not be obvious that FlushAnimations is only concerned with throttled
animations due to its name. FlushAnimations is simply intended to post
animation restyles for out-of-date animations. Any animations that are *not*
throttled will either be up to date, or we will have already posted an
animation restyle so we only need to consider throttled animations in this case.
e3aa66edbd85d7ab9fe63c61f1e65ce314ce9f46: Bug 1232577 part 8 - Move call to PostRestyleForAnimation to EffectCompositor; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:54 +0900 - rev 321311
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 8 - Move call to PostRestyleForAnimation to EffectCompositor; r=heycam
This patch continues to migrate functionality from
AnimationCollection::RequestRestyle to EffectCompositor::RequestRestyle.
In order to post the animation restyle from the EffectCompositor, this patch
also moves the PostRestyleForAnimation method to EffectCompositor.
The GetElementToRestyle method is temporarily duplicated in both
EffectCompositor and AnimationCollection however we will remove the version in
AnimationCollection later in this patch series.
6511f2832185cde9f16402383baf3cb4096bbacb: Bug 1232577 part 7 - Move call to SetNeedStyleFlush() to EffectCompositor::RequestRestyle; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:54 +0900 - rev 321310
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 7 - Move call to SetNeedStyleFlush() to EffectCompositor::RequestRestyle; r=heycam
In this patch series we are gradually migrating style rule updating
functionality from AnimationCollection to EffectCompositor. This patch moves
part of the RequestRestyle method from one class to the other.
Note that in both cases we only call SetNeedsStyleFlush if we haven't already
posted an animation restyle. (In the case of AnimationCollection we check this
using the mHasPendingAnimationRestyle flag, and in EffectCompositor case we
simply check if the element is already in the "needs restyle" hashmap. If it is,
either we already have a throttled restyle and have called SetNeedsStyleFlush or
we have a standard restyle and have posted an animation restyle.)
The added check for a null pres context matches the behavior of
AnimationCollection::RequestRestyle which has an equivalent early return at the
beginning of the function.
191626c92b35586b0454db2d52a7f028906167c2: Bug 1232577 part 6 - Add animation rule refresh time to EffectSet; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:54 +0900 - rev 321309
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 6 - Add animation rule refresh time to EffectSet; r=heycam
AnimationCollection keeps a TimeStamp that records the refresh driver time when
the animation style rule was last updated. This is used for two purposes:
1. To determine when the style rule is out of date.
2. For animations that are partially throttled on the main thread, e.g.
transform animations that affect the scrollable region which we update every
200ms on the main thread.
In this bug we are removing all the overlapping bits of state used to track if
animations are up-to-date or not and replacing them with the hashmap stored on
the EffectCompositor which tracks which animations are currently in need of an
update. As a result, we would like to remove this style rule refresh time.
However, we will need something for case (2) from above.
This patch adds an animation rule refresh time to the EffectSet purely for the
purposes of partially-throttled animations so that we can later remove the style
rule refresh time from AnimationCollection.
c642726a9f8ec80bff15d4f78535011f55d4f1b6: Bug 1232577 part 5 - Make sure CSSTransition::CancelFromStyle updates the transitions level of the cascade; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:53 +0900 - rev 321308
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 5 - Make sure CSSTransition::CancelFromStyle updates the transitions level of the cascade; r=heycam
2cb0835ccdc019db08ffba88c6005ee4cf09e5b7: Bug 1232577 part 4 - Add and remove (pseudo-)elements needing an animation style rule update to the EffectCompositor; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:53 +0900 - rev 321307
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 4 - Add and remove (pseudo-)elements needing an animation style rule update to the EffectCompositor; r=heycam
This patch uses the presence/absence of (pseudo-)elements in the "needs
animation rule update" hashmap on EffectCompositor to detect if a style update
is required. The various flags in AnimationCollection that do a similar job
still remain so that we can remove them one-by-one in subsequent patches in
this series.
92654d4ad2ebb0f5d34f2c88928cfc44e852d2bf: Bug 1232577 part 3 - Move RestyleType to EffectCompositor; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:53 +0900 - rev 321306
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 3 - Move RestyleType to EffectCompositor; r=heycam
This is in preparation for moving RequestRestyle to EffectCompositor (and
because we'll run into compile issues if we don't since AnimationCommon.h
includes too many interdependent definitions).
4fa5cf94bb6d3e2f8f90519add3befce303f6901: Bug 1232577 part 2 - Add a hashmap to ElementCompositor to track which (pseudo-) elements need to have their animation style rule updated; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:53 +0900 - rev 321305
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 2 - Add a hashmap to ElementCompositor to track which (pseudo-) elements need to have their animation style rule updated; r=heycam
We will eventually use this in place of the various state flags stored on
AnimationCollection (e.g. mStyleRuleRefreshTime, mStyleChanging,
mHasPendingAnimationRestyle) as well as to do a more targetted update in
FlushAnimations and AddStyleUpdatesTo.
68108d1f2d46c30566cdcccd780f760caf4113b8: Bug 1232577 part 1 - Add EffectCompositor as a member of nsPresContext; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:53 +0900 - rev 321304
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1232577 part 1 - Add EffectCompositor as a member of nsPresContext; r=heycam
Since we want to track elements needing a restyle on EffectCompositor we need
to scope it to an nsPresContext rather than just making if a collection of
static methods.
888bce768ee85c035353d18d09d046e4de2d02fe: Bug 1228641 - Rename begin/size to aBegin/aSize to avoid shadow warnings; r=botond
Brian Birtles <birtles@gmail.com> - Wed, 13 Jan 2016 07:54:53 +0900 - rev 321303
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1228641 - Rename begin/size to aBegin/aSize to avoid shadow warnings; r=botond
On B2G/Android we get warnings if the begin/size parameters to the constructor
match the method names begin()/size(): declaration of 'size/begin' shadows
a member of 'this'.
26a22167872690258c715c2e45a15bfbd7898e0f: Bug 1096804 - Fixup a typo and the original skip-if conditional string that landed with browser_taskbar_preview.js. r=tests CLOSED TREE
Jim Mathies <jmathies@mozilla.com> - Tue, 12 Jan 2016 16:47:13 -0600 - rev 321302
Push
9363 by jlorenzo@mozilla.com at Wed, 13 Jan 2016 13:04:42 +0000
Bug 1096804 - Fixup a typo and the original skip-if conditional string that landed with browser_taskbar_preview.js. r=tests CLOSED TREE