Граф коммитов

38 Коммитов

Автор SHA1 Сообщение Дата
Hiroyuki Ikezoe 3e951aea06 Bug 1458457 - Use the current frame time stamp instead of the previous frame's time stamp in the case where the animation was play pending state when the animation was sent to the compositor. r=birtles
When we send play-pending animation to the compositor, we resolve its start
time with the time at the very moment we send the animation to the compositor
instead of refresh drivers' tick time.  That means that it's possible that the
start time indicates more future time stamp than the previous frame time stamp
on the compositor.  If we were to use the previous frame timestamp in this
case, then we'd end up treating the animation as if it had not yet started so
we would skip its initial paint.

MozReview-Commit-ID: 8TdZ6m0gqMm

--HG--
extra : rebase_source : ce712308ef9ef24dcef2c39a89bb5935e305a09c
2018-05-08 16:58:06 +09:00
Hiroyuki Ikezoe f389ab6b3a Bug 1458457 - Move the logic that we use whether the previous time stamp or the last compose time stamp into SampleAnimationForEachNode. r=birtles
So that we can do an additional check depending on each animation in a subsequent
patch in this patch series.

MozReview-Commit-ID: C1ZJMdwraVk

--HG--
extra : rebase_source : baa71d25e45fbc1db20312788251bcced692b6cf
2018-05-08 12:58:42 +09:00
Hiroyuki Ikezoe 41be7768d1 Bug 1457249 - Use actually calculated value for the assertion that checks animation value is unchanged when we decided to skip calculation for the animation on debug build. r=kats
Before this change, the value which was set by SetShadowBaseTransform()
has been used for the assertion, but it is possible that the value is changed
by APZ.  And it's hard to tell whether the value has been changed by APZ or not
and it's hard to *reverse-calculate* the differences in the past APZ at the
moment we want to do the assert.

So after this patch, on debug build we don't actually skip the calculation for
unchanged animations and use the newly calculated value for the assertion.

MozReview-Commit-ID: 8fCcvvbUMHe

--HG--
extra : rebase_source : 0ff5e7100ad33a690bb0edd02af2b00c749afbbe
2018-04-28 18:09:27 +09:00
Dorel Luca 5846115845 Backed out 2 changesets (bug 1456679) for Reftests failure. CLOSED TREE
Backed out changeset c40209504a45 (bug 1456679)
Backed out changeset 351ae90cc6a0 (bug 1456679)
2018-04-26 05:07:47 +03:00
Hiroyuki Ikezoe 861eb6a9fb Bug 1456679 - Make SampleAnimations return boolean to tell there is any animations even if the animation in delay phase. r=kats
If the animation is in delay phase, we shouldn't produce any values for the
animation but we have to make sure subsequent ticks happen in order to the time
when the animation starts.  So what we should do here is that

1) Make AnimationHelper::SampleAnimations() return boolean, return true if
   there is any animation.
2) Schedule the next tick if AnimationHelper::SampleAnimations return true

This setup is equivalent to what we do non-WebRender.

So that we don't need to set non-animated value as AnimatedValue for delay
phase to make subsequent ticks happen for the delay phase animations.  The
non-animated value will be dropped in the next patch.

MozReview-Commit-ID: IwltLGgvT7K

--HG--
extra : rebase_source : 9854b182134adf3060260849741142841721d65b
2018-04-26 08:28:44 +09:00
Hiroyuki Ikezoe 59c7ccd500 Bug 1456003 - Don't allocate new AnimatedValue when we update AnimatedValue. r=kats
We need to allocate new AnimatedValue only if there is no AnimatedValue
corresponding to the id in the hashtable.

MozReview-Commit-ID: HeRt74Tnojt

--HG--
extra : rebase_source : 6920ac7fe770e928883e9995469e972799b3c02e
2018-04-24 15:13:10 +09:00
Hiroyuki Ikezoe df02c10b40 Bug 1454324 - Skip calculating animation value if animation's progress value hasn't been changed since the last composition and if there are no other animations on the same element. r=birtles,kats
Note that we have to calculate animation values if there is another animation
since the other animation might be 'accumulate' or 'add', or might have a
missing keyframe (i.e. the calculated animation values will be used in the
missing keyframe).

MozReview-Commit-ID: rQyS9nuVJi

--HG--
extra : rebase_source : 6ddc70308e223a709eba9c4c2f05e42bbc0f3160
2018-04-24 09:27:54 +09:00
Hiroyuki Ikezoe 2dc22f118d Bug 1454324 - Cache animation TimingParams on the compositor. r=birtles
We don't need to calculate TimingParams each time we compose an animation on
the compositor because TimingParams is immobile since the animation was sent to
the compositor.

MozReview-Commit-ID: 3rfzkdGClES

--HG--
extra : rebase_source : e28650a30b1cbd14789688f2acc03d204069e2fb
2018-04-24 09:27:53 +09:00
Hiroyuki Ikezoe 9e4f56c4f5 Bug 1455155 - Drop AnimationValue usage in gfx/. r=birtles
Two AnimationValue are still used in AnimationPropertySegment since the
AnimationPropertySegment is used in compose_animation_segment() which is also
invoked on the main-thread, so we will fix it later in a bug that will drop
AnimationValue usage on the main-thread side.

MozReview-Commit-ID: B086g2qHtZL

--HG--
extra : rebase_source : 419308155bf95fb0acd94549c2c6cc9690925b29
2018-04-19 13:50:14 +09:00
Hiroyuki Ikezoe e53f74cb86 Bug 1454550 - Call AnimationHelper::SampleAnimationForEachNode only for layers that have animations. r=kats
This is slightly efficient since we don't need to call
GetBaseAnimationStyle() or we do skip allocating animation data for such case.

MozReview-Commit-ID: BYFNwZsZ1oE

--HG--
extra : rebase_source : 441d7431bd444f1513a32d4da3c206c7df34ed94
2018-04-17 13:20:33 +09:00
Boris Zbarsky a0b6e32bba Bug 1449631 part 12. Remove the Nullable smuggling from nsIDOMEventTarget. r=smaug
MozReview-Commit-ID: 73qhRSCpr3S
2018-04-05 13:42:42 -04:00
Xidorn Quan efc0cdde02 Bug 1447828 part 8 - Remove remaining uses of StyleBackendType as well as the type itself. r=emilio
MozReview-Commit-ID: 6sh4eKvDpRF

--HG--
extra : rebase_source : 7d83f2b2d4e2739333016ed82754bf3a4a700de4
extra : source : 147ca562a24652c3f30add793213db70aff65e9e
2018-03-29 02:34:34 +11:00
Emilio Cobos Álvarez 126534b1e9 Bug 1446108: Don't create bogus angles in layers animation code. r=kats
Summary:
I can propagate the error up if needed, but looks like the code should cope with
it just fine with this change.

Reviewers: kats

Bug #: 1446108

Differential Revision: https://phabricator.services.mozilla.com/D794

MozReview-Commit-ID: Dm6EKIC6F5i
2018-03-23 19:09:42 +01:00
Brindusan Cristian bfd45c93ba Backed out 2 changesets (bug 1446108) for build bustages on build\src\obj-firefox\dist\include\mozilla/Alignment.h(29) CLOSED TREE
Backed out changeset 08814c30af6d (bug 1446108)
Backed out changeset 7977451e9641 (bug 1446108)
2018-03-23 18:44:07 +02:00
Emilio Cobos Álvarez 005aa351c9 Bug 1446108: Don't create bogus angles in layers animation code. r=kats
Summary:
I can propagate the error up if needed, but looks like the code should cope with
it just fine with this change.

Reviewers: kats

Bug #: 1446108

Differential Revision: https://phabricator.services.mozilla.com/D794

MozReview-Commit-ID: Dm6EKIC6F5i
2018-03-23 16:40:55 +01:00
Emilio Cobos Álvarez f7522ae728 Bug 1447358: Unifdef the old style system code. r=jwatt
Summary:
This has been automatically generated using:

  http://dotat.at/prog/unifdef/

And:

find $OBJDIR -type f -name '*.h' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

find $OBJDIR -type f -name '*.cpp' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

MozReview-Commit-ID: I4NdKqbMXzJ

Reviewers: jwatt

Bug #: 1447358

Differential Revision: https://phabricator.services.mozilla.com/D779
2018-03-21 10:20:34 +01:00
Cameron McCormack 2cea1ba7c1 Bug 1430014 - Part 6: #ifdef out a bit more animation-related code. r=hiro
MozReview-Commit-ID: B9TaVJFak26

--HG--
extra : source : 820eed2682b6a6cda892d091ee037ff1eeacd69f
2018-02-01 15:04:04 +11:00
Boris Chiou 0576efed8c Bug 1340005 - Part 7: Switch compositor animations to Servo backend for desktop. r=birtles,hiro,nical
We want to always use Servo animation backend on the compositor.
However, Android doesn't support Stylo now, so add a defined flag for it.

MozReview-Commit-ID: 63MnTBnq6yv

--HG--
extra : rebase_source : dce46737f81e4e217e9fd67b6bec722994dca6a2
2017-10-27 21:13:27 +02:00
Boris Chiou 3788926119 Bug 1340005 - Part 6: Move AppendTransformFunction into AnimationValue struct. r=birtles
MozReview-Commit-ID: KhjKXxkllEF

--HG--
extra : rebase_source : 6f22a5f0a90f3f3d160f64c67e6fd6d04a2c1441
2017-10-17 13:11:19 +08:00
Boris Chiou 387cd4d8a1 Bug 1340005 - Part 5: Implement SampleValue for Servo backend. r=birtles
Use the new added FFI, Servo_ComposeAnimationSegment, to compose an
animation segment from Servo backend on the compositor.

MozReview-Commit-ID: LNgpCSIlDl9

--HG--
extra : rebase_source : 5b5c145fae877b4f4b01ea54259737dc9dad2951
2017-10-27 21:09:11 +02:00
Boris Chiou 0129bb4f52 Bug 1340005 - Part 4: Retrieve transform list from AnimationValue. r=birtles
MozReview-Commit-ID: 82NAOBV2rEl

--HG--
extra : rebase_source : 073ff742dcea4573febeec3b57c60b0f1f5736e2
2017-09-25 14:25:43 +08:00
Boris Chiou 743614effe Bug 1340005 - Part 3: Use AnimationValue on the compositor thread. r=birtles
MozReview-Commit-ID: CtnDLsdcr9x

--HG--
extra : rebase_source : 3d4a0f40e2f522471555c04c88474cb08e082851
2017-09-21 17:01:48 +08:00
Boris Chiou 7086921688 Bug 1340005 - Part 2: Implement AnimationValue::Transform. r=birtles
MozReview-Commit-ID: BDKcpDIM9nb

--HG--
extra : rebase_source : 43a5e7f053d746198f422487f7e19f535ccd9dc5
2017-10-27 21:06:30 +02:00
Boris Chiou 701609334e Bug 1340005 - Part 1: Implement AnimationValue::Opacity. r=birtles
We will use Servo backend on the compositor, so implement this for opacity.

MozReview-Commit-ID: BeWR2nBSbjb

--HG--
extra : rebase_source : eb5db3cf04640a83f13857984e792a949f26bcc7
2017-10-27 21:04:52 +02:00
Hiroyuki Ikezoe aef8a014cd Bug 1399714 - Iterate animation segments for setting start/end values and timing functions just once. r=boris
MozReview-Commit-ID: 7ySuFcSi3cH

--HG--
extra : rebase_source : aef6b905fb34782700fc354905fc0a5d4c72e857
2017-09-14 12:59:06 +09:00
Kartikaya Gupta b95fb227dd Bug 1375497 - Extract helper methods to read animation values. r=pchang
MozReview-Commit-ID: EusfcwPVGkL

--HG--
extra : rebase_source : a52bc1ce8430288e2f2cf41b13fa18d635c9fb7c
2017-06-27 20:29:06 -04:00
Hiroyuki Ikezoe 8894ec184b Bug 1374882 - Add a TimingParams ctor on the compositor. r=birtles
MozReview-Commit-ID: BFiwrphRND0

--HG--
extra : rebase_source : 79bb7aed8ec25f9b10a34276dec78577c3af7b86
2017-06-22 12:12:42 +09:00
Boris Chiou 1b7cc40933 Bug 1361663 - Part 1: Use double instead of float for the progress of interpolation. r=birtles
We get the progress as |double|, and then pass it to a function by a |float|
type, and then finally cast it back to |double| for the interpolation.
We should avoid casting it back and forth, so change the function argument to
use |double| type for the progress.

MozReview-Commit-ID: 7QzfVBC7hSt

--HG--
extra : rebase_source : 62467bf0a734b650f524af656658cdfdabca2a5c
2017-05-22 13:35:15 +08:00
Brian Birtles 5308137759 Bug 1363107 - Check if the startTime is set before using it in SampleAnimationForEachNode; r=hiro
We are seeing occasional failed release assertions from calling
animation.startTime().get_TimeDuration() in SampleAnimationForEachNode on
Windows.

My theory is that in some circumstances (perhaps graphic-driver related?) when
creating a layer transaction we fail to call Layer::StartPendingAnimations and
end up sending pending animations to the compositor. Prior to bug 1334583 that
would have only triggered a debug assertion so it may have gone unnoticed if it
depends on the system configuration.

This patch makes us check that the startTime is set before we try to access it
in order to avoid triggering a release-time assertion. If the startTime is not
set we will use the hold time which should give us the correct behavior for
a still-pending animation. (Furthermore, the holdTime is set unconditionally
when we create animations so it should be correct -- but even if it were not
set explicitly, its initial zero value would still likely produce a reasonable
result until the start time was updated on a subsequent layer transaction. At
very least, it should not crash. Likewise, if it was set to an incorrect value.)

This patch also strengthens the debug assertion in SampleAnimationForEachNode to
check that not only is start time not-null, but that it is set to a TimeDuration
since MaybeTimeDuration also includes a third uninitialized "None" state.
2017-05-18 14:06:36 +09:00
Kartikaya Gupta b6b23a1376 Merge m-c to graphics
MozReview-Commit-ID: DVUE3Wys3HV
2017-05-03 08:52:43 -04:00
peter chang 8f5fde5b20 Bug 1358437 - pass layer's transform/opacity to compositor, r?kats
Need to pass the default transform/opacity to compositor if animations
exist because it is possible that gecko fails to get animated value
after animation sampling, like an animation with delay.

MozReview-Commit-ID: IK06hWvaSPf
2017-05-02 10:38:22 +08:00
peter chang e8e398dcd1 Bug 1358437 - pass layer's transform attributes for transform animation, r?kats
MozReview-Commit-ID: J7JHuwvWuet
2017-05-02 10:29:42 +08:00
Brian Birtles 5267613207 Bug 1334583 - Pass a separate timeOrigin and startTime for compositor animations; r=hiro
By passing the startTime as a TimeDuration we are able to represent times in the
distant past (and with the same range as we can represent on the main thread so
that if we do encounter range errors in future, they should not differ between
the main thread and the compositor).

This patch includes a crashtest. I have verified that, without the code changes
included in this patch, this crashtest fails on debug builds on OSX.

MozReview-Commit-ID: EDuKLzfEC0K

--HG--
extra : rebase_source : 1883080fdfac8c33f70698145f21e67cbdfdd4f2
2017-05-02 16:49:51 +09:00
peter chang e238a80556 Bug 1345017 - Add animation sampling for WR, r=kats
MozReview-Commit-ID: AR2vajUf2o0
2017-04-12 16:40:48 +08:00
peter chang be4bd90f39 Bug 1337889 - use CompositorAnimationsId to query Opacity/Transform animation, r=hiro,kats
MozReview-Commit-ID: 3s1kzOQAfrd

--HG--
extra : rebase_source : eb6ff70179b6460c8405c738b65051e2b303af90
2017-02-09 17:30:11 -05:00
peter chang 29adc38bc8 Bug 1337889 - Add CompositorAnimationsId for layer animations, r=hiro
MozReview-Commit-ID: 4r9VhF4Vp2l

--HG--
extra : rebase_source : 0af2185ab037bbe7e300876797f1cba824a381f2
2017-02-08 14:31:45 -05:00
peter chang 1b069223ac Bug 1332211 - refactor animation code in AsyncCompositionManager, r=hiro
MozReview-Commit-ID: 5PGYTv1cSeT

--HG--
extra : rebase_source : 4e64500c2c374d16248ed55cad042233aba9e194
2017-01-26 15:04:16 +08:00
peter chang 53ef21c124 Bug 1332211 - Move Layer::SetAnimation into AnimationHelper, r=hiro
MozReview-Commit-ID: JQMAJt8lvYo

--HG--
extra : rebase_source : bf1e26f074acd8f804fdaf2ccb55255dda2028f2
2017-01-25 10:51:30 +08:00