Closed Bug 1479173 Opened Last year Closed 11 months ago

Auto-generate an nsCSSPropertyID array for properties that can run on the compositor and use it in applicable places

Categories

(Core :: DOM: Animation, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox63 --- wontfix
firefox64 --- wontfix
firefox65 --- fixed

People

(Reporter: hiro, Assigned: hiro)

References

(Blocks 2 open bugs)

Details

Attachments

(9 files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
I think this is the first step to make more properties run on the compositor.

There are some places that we iterate properties in LayerAnimationInfo and use the count of LayerAnimationInfo, those places can be rewritten with the new nsCSSPropertyIDSet.
Summary: Auto-generate nsCSSPropertyIDSet for properties that can run on the compositor and use it in applicable places → Auto-generate an nsCSSPropertyID array for properties that can run on the compositor and use it in applicable places
Blocks: 1425837
Blocks: 1429305
Blocks: 1504065
Also add a script to generate the CSS properties set by looking at
CanAnimateOnCompositor flag in servo's property definitions.
In the case of WebRender there is no layers, but actually we'd been using it for
WebRender too, that's confusing.

Depends on D10689
The comment there was wrong.  We just bail out from there only if
mIsRunningCompositor is false, so it doesn't matter whatever the layer
generation check results.  (i.e., we don't bail out in the case where
mIsRunningCompositor is true).

Also, we iterate over mProperties in the LayerAnimationInfo::sRecords loop
through HasEffectiveAnimationOfProperty, so it doesn't matter that we iterate
mProperties before the loop either.  We will avoid the iteration in the sRecords
loop in a subsequent patch in this series.

Depends on D10692
If mIsRunningOnCompositor is true, the property is effective state because
CanThrottle() is called in advance of a restyle for the effect so that we can
drop the check and drop skipping in the case of non-effective properties.

Depends on D10694
Sorry, it might take me another day or two to get to this -- I'm off sick today and possibly tomorrow.
No worries!  I think I found an underlying issue on compositor runnable properties while I was debugging patches for bug 1504065.  It actually doesn't affect patches for this bug, but I have to write a test case to confirm that.
Depends on: 1504929
Pushed by hikezoe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7cf0ad1af067
Add a static constexpr function returns an nsCSSPropertyIDSet being consist of CSS properties set can be run on the compositor. r=heycam,birtles
https://hg.mozilla.org/integration/autoland/rev/94f0ae94a02c
Add an assertion checking the properties in nsCSSPropertyIDSet::CompositorAnimatable equals to the properies in LayerAnimationInfo::sRecords. r=birtles
https://hg.mozilla.org/integration/autoland/rev/43c6a7863536
Use nsCSSPropertyIDSet::CompositorAnimatableCount() for LayerAnimationInfo::kRecords. r=birtles
https://hg.mozilla.org/integration/autoland/rev/efcbbb9daa39
Rename LayerAnimationInto::mLayerType to LayerAnimationInfo::mDisplayitemType. r=birtles
https://hg.mozilla.org/integration/autoland/rev/c330e7e1eb1d
Replace LayerAnimationInfo::kRecords with nsCSSPropertyIDSet::CompositorAnimatableCount. r=birtles
https://hg.mozilla.org/integration/autoland/rev/ed1c344ccf0d
Use nsCSSPropertyIDSet::CompositorAnimatable and HasCompositorAnimatableProperty in EffectCompositor::UpdateCascadeResults. r=birtles
https://hg.mozilla.org/integration/autoland/rev/89dbc6f7f959
Check mIsRunningOnCompositor flag before iterating LayerAnimationInfo. r=birtles
https://hg.mozilla.org/integration/autoland/rev/73aba16a223f
Call EffectSet::GetEffectSet in CanThrottle just once. r=birtles
https://hg.mozilla.org/integration/autoland/rev/439ac5cfbced
Check animation generation change in the mProperties loop and drop LayerAnimationInfo::sRecords loop. r=birtles
It seems MSVC doesn't like 'auto list = COMPOSITOR_ANIMATABLE_PROPERTY_LIST;' in CompositorAnimatableCount(). :/
Flags: needinfo?(hikezoe)
Pushed by hikezoe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ead2368dc078
Add a static constexpr function returns an nsCSSPropertyIDSet being consist of CSS properties set can be run on the compositor. r=heycam,birtles
https://hg.mozilla.org/integration/autoland/rev/426beb45b7d4
Add an assertion checking the properties in nsCSSPropertyIDSet::CompositorAnimatable equals to the properies in LayerAnimationInfo::sRecords. r=birtles
https://hg.mozilla.org/integration/autoland/rev/3e986c035887
Use nsCSSPropertyIDSet::CompositorAnimatableCount() for LayerAnimationInfo::kRecords. r=birtles
https://hg.mozilla.org/integration/autoland/rev/b2857fb4156f
Rename LayerAnimationInto::mLayerType to LayerAnimationInfo::mDisplayitemType. r=birtles
https://hg.mozilla.org/integration/autoland/rev/eb673eb63998
Replace LayerAnimationInfo::kRecords with nsCSSPropertyIDSet::CompositorAnimatableCount. r=birtles
https://hg.mozilla.org/integration/autoland/rev/42bd72076aca
Use nsCSSPropertyIDSet::CompositorAnimatable and HasCompositorAnimatableProperty in EffectCompositor::UpdateCascadeResults. r=birtles
https://hg.mozilla.org/integration/autoland/rev/389edd54ab0f
Check mIsRunningOnCompositor flag before iterating LayerAnimationInfo. r=birtles
https://hg.mozilla.org/integration/autoland/rev/a3dfabd0a69a
Call EffectSet::GetEffectSet in CanThrottle just once. r=birtles
https://hg.mozilla.org/integration/autoland/rev/774f5ab895af
Check animation generation change in the mProperties loop and drop LayerAnimationInfo::sRecords loop. r=birtles
\o/
You need to log in before you can comment on or make changes to this bug.