Commit Graph

41 Commits

Author SHA1 Message Date
Jean-Yves Avenard
e98f4caee4 Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel
* Remove redundant virtual keywords
* Mark all destructors of inheriting classes as virtual for clarity
* Mark all classes without virtual destructor as final (exposed errors)
* Make destructor virtual where it needed to be (some were missing)
* Replace empty ({}) code declaration in header with = default
* Remove virtual unused methods

I probably missed some, it quickly became a rabbit hole.

Differential Revision: https://phabricator.services.mozilla.com/D26060
2019-04-11 12:36:51 +00:00
Alex Gaynor
8dedb7de6e Bug 1540190 - replace the AnimationData IPDL union with native Maybe syntax; r=kats
Differential Revision: https://phabricator.services.mozilla.com/D25425
2019-03-29 19:54:14 +00:00
Alex Gaynor
b8181f15ab Bug 1538796 - Part 3 - convert IPDL OptionalOpacity union to use native Maybe syntax; r=kats
Depends on D24748

Differential Revision: https://phabricator.services.mozilla.com/D24749
2019-03-25 19:29:46 +00:00
Doug Thayer
78132cddf9 Bug 1441308 - Core renderroot splitting changes r=kats,sotaro
This is a large patch that contains all of the core changes for
renderroot splitting.

Differential Revision: https://phabricator.services.mozilla.com/D20701
2019-03-22 18:28:42 +00:00
Ciure Andrei
be6acddb9e Backed out 7 changesets (bug 1441308)for causing webrender build bustages CLOSED TREE
Backed out changeset 1764701d11d1 (bug 1441308)
Backed out changeset 32f7793dfd1a (bug 1441308)
Backed out changeset d8b4d6ec9b40 (bug 1441308)
Backed out changeset e2f83e4816dd (bug 1441308)
Backed out changeset baee8ada680f (bug 1441308)
Backed out changeset c09a51622e98 (bug 1441308)
Backed out changeset 737807563dd5 (bug 1441308)
2019-03-22 10:52:44 +02:00
Doug Thayer
4c535e830a Bug 1441308 - Core renderroot splitting changes r=kats,sotaro
This is a large patch that contains all of the core changes for
renderroot splitting.

Differential Revision: https://phabricator.services.mozilla.com/D20701
2019-03-22 03:15:14 +00:00
Boris Chiou
44268dd80d Bug 1425837 - Part 4: Implement compositor animations on translate/rotate/scale. r=hiro,birtles
On the sender side of transactions, we have to convert the individual transforms
to the proper types in layers::Animations, and this includes SetAnimatable and
the definition in LayersMessages.

On the compositor side (i.e. received side of transactions). Basically, we
convert the list of layers::Animation into a list of `PropertyAnimationGroup`,
which is an intermediate value. And then use this list to do interpolation for
each property in `SampleAnimationForEachNode`, which will return a list of
`RefPtr<RawServoAnimationValue>`.

Depends on D23062

Differential Revision: https://phabricator.services.mozilla.com/D22565
2019-03-18 18:04:50 +00:00
Boris Chiou
6099a4a63f Bug 1425837 - Part 3: Don't store AnimationArray (a.k.a. AnimationInfo::mAnimations) on the compositor thread. r=birtles
The original implementation about "setting animations" is a little bit hard
to read. In `SetAnimations()`, we create a new intermediate data,
`AnimData`, and we mutate the original animations. And then iterate this
mutated animations & intermediate data for sampling. In this bug, we are
planning to group the AnimData as a useful data structure for supporting
multiple properties transform-like animations, so it seems the structure
of original animations may be hard to use after that. Therefore,
we decide to do some reworks on this:

First, we do renames,
1. InfalliableTArray to nsTArray. (They are the same.)
2. AnimData to PropertyAnimation.
3. SetAnimations() to ExtractAnimations(), which returns
   nsTArray<PropertyAnimationGroup>. Each entry in the array is for one
   property. In this patch, there is only one entry. We will extend this
   to multiple entries in the next patch.

And then rework `ExtractAnimations()`, which stores all the necessary data
in `PropertyAnimationGroup`. For WR, we store this in
`CompositorAnimationStorage`. For non-WR, we store it in `AnimationInfo`.
So we can just use this organized data structure for supporting multiple
properties animations. (See the next patch.)

Depends on D22563

Differential Revision: https://phabricator.services.mozilla.com/D23062
2019-03-18 18:04:48 +00:00
Boris Chiou
191d1555e1 Bug 1425837 - Part 2: Factor out the conversion from ServoAnimationValue into Matrix4x4. r=hiro
Both layers and web-render use this function, so we factor it out.

Depends on D22562

Differential Revision: https://phabricator.services.mozilla.com/D22563
2019-03-18 18:04:46 +00:00
Sylvestre Ledru
e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Hiroyuki Ikezoe
aa4634b77b Bug 1504065 - Support background-color animations on the compositor for nsIDOMWindowUtils::GetOMTAValue. r=birtles
Depends on D13001

Differential Revision: https://phabricator.services.mozilla.com/D13002
2018-11-28 00:59:15 +00:00
Andreea Pavel
dbd394ae9e Backed out 2 changesets (bug 1504065) for failing Win reftest at child-in-animating-element-display-none.html on a CLOSED TREE
Backed out changeset 129188370231 (bug 1504065)
Backed out changeset 359e81b35cfb (bug 1504065)
2018-11-27 15:33:29 +02:00
Hiroyuki Ikezoe
b0ee38c41e Bug 1504065 - Support background-color animations on the compositor for nsIDOMWindowUtils::GetOMTAValue. r=birtles
Depends on D13001

Differential Revision: https://phabricator.services.mozilla.com/D13002
2018-11-27 09:27:22 +00:00
Andi-Bogdan Postelnicu
876055ba21 Bug 1453795 - GFX - Initialize member fields in classes/ structures. r=nical 2018-06-16 17:42:33 +03:00
Hiroyuki Ikezoe
6168d4c77d Bug 1479234 - Drop GetAnimationOpacity and GetAnimationTransform ipc calls. r=boris,froydnj
They are no longer used.

MozReview-Commit-ID: 1SaIkj4ryUF
2018-07-31 06:13:15 +09:00
Hiroyuki Ikezoe
25ee7c636d Bug 1479234 - Introduce a generic function to get an animation value on the compositor. r=boris,froydnj
On the compositor we store animation values in a hash table and the hash is
the compositor animation id which is a unique id for each property respectively.
So we can get the corresponding animation value for the given property.

In this patch there are lots of duplicated code, but they will be removed in the
next patch.

MozReview-Commit-ID: 7EboVcculcg
2018-07-31 06:13:15 +09:00
Coroiu Cristina
cd83311c24 Backed out 4 changesets (bug 1479234) for build bustage at build/src/gfx/vr/ipc/VRLayerChild.cpp on a CLOSED TREE
Backed out changeset 6ecc1666f571 (bug 1479234)
Backed out changeset c3bab1bc97cf (bug 1479234)
Backed out changeset c8c2625a33ba (bug 1479234)
Backed out changeset 2ffc8e9d5686 (bug 1479234)
2018-07-31 00:32:04 +03:00
Hiroyuki Ikezoe
f41857c497 Bug 1479234 - Drop GetAnimationOpacity and GetAnimationTransform ipc calls. r=boris,froydnj
They are no longer used.

MozReview-Commit-ID: 1SaIkj4ryUF
2018-07-31 06:13:15 +09:00
Hiroyuki Ikezoe
00231dd480 Bug 1479234 - Introduce a generic function to get an animation value on the compositor. r=boris,froydnj
On the compositor we store animation values in a hash table and the hash is
the compositor animation id which is a unique id for each property respectively.
So we can get the corresponding animation value for the given property.

In this patch there are lots of duplicated code, but they will be removed in the
next patch.

MozReview-Commit-ID: 7EboVcculcg
2018-07-31 06:13:15 +09:00
Emilio Cobos Álvarez
4b8b5e1717 Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Hiroyuki Ikezoe
5d9c74e4b5 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
2018-05-08 15:48:27 +09:00
Hiroyuki Ikezoe
999ddde682 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
2018-05-08 16:58:06 +09:00
Hiroyuki Ikezoe
64245bf502 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
2018-05-08 12:58:42 +09:00
Dorel Luca
642a3c7930 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
2da9ef01f1 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
2018-04-26 08:28:44 +09:00
Hiroyuki Ikezoe
302c271b0f 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
2018-04-24 09:27:54 +09:00
Hiroyuki Ikezoe
0df336123e 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
2018-04-24 09:27:53 +09:00
Hiroyuki Ikezoe
dddfed71b4 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
2018-04-19 13:50:14 +09:00
Hiroyuki Ikezoe
916a26357f 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
2018-04-17 13:20:33 +09:00
Sebastian Hengst
d91e9954eb Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
6095241db8 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Boris Chiou
63c95da28b Bug 1340005 - Part 3: Use AnimationValue on the compositor thread. r=birtles
MozReview-Commit-ID: CtnDLsdcr9x
2017-09-21 17:01:48 +08:00
Kartikaya Gupta
e808d8a16d Bug 1402439 - Add some documentation for the compositor animation code. r=pchang
Also removes an unneeded forward-declaration.

MozReview-Commit-ID: 8BPGPtkIBui
2017-09-22 16:39:53 -04:00
sotaro
e8ff637f79 Bug 1376896 - Fix AnimatedValue leak at CompositorAnimationStorage during OMTA r=kats 2017-07-06 12:06:41 +09:00
Kartikaya Gupta
70239514ba Bug 1375497 - Extract helper methods to read animation values. r=pchang
MozReview-Commit-ID: EusfcwPVGkL
2017-06-27 20:29:06 -04:00
peter chang
ab262ee631 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
f11c1bde12 Bug 1345017 - Add animation sampling for WR, r=kats
MozReview-Commit-ID: AR2vajUf2o0
2017-04-12 16:40:48 +08:00
peter chang
dc497a1152 Bug 1337889 - use CompositorAnimationsId to query Opacity/Transform animation, r=hiro,kats
MozReview-Commit-ID: 3s1kzOQAfrd
2017-02-09 17:30:11 -05:00
peter chang
12f701a514 Bug 1337889 - Add CompositorAnimationsId for layer animations, r=hiro
MozReview-Commit-ID: 4r9VhF4Vp2l
2017-02-08 14:31:45 -05:00
peter chang
7969ef699d Bug 1332211 - refactor animation code in AsyncCompositionManager, r=hiro
MozReview-Commit-ID: 5PGYTv1cSeT
2017-01-26 15:04:16 +08:00
peter chang
0ec7b5f26c Bug 1332211 - Move Layer::SetAnimation into AnimationHelper, r=hiro
MozReview-Commit-ID: JQMAJt8lvYo
2017-01-25 10:51:30 +08:00