Closed Bug 1591629 Opened 5 years ago Closed 4 years ago

No need to pass TransformData for all transform-like properties to compositor

Categories

(Core :: CSS Transitions and Animations, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: boris, Assigned: boris)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

We can reduce the usage of data we pass via IPC LayersMessages by

  1. Use an individual struct for motion path data (i.e. MotionPathData). If there is no offset-*, we just set it Nothing(). (This may not have benefits on data usage because Maybe<> still allocate space it may need.) But still worth to do.
  2. Don't pass TransformData and MotionPathData for all transform-like properties. (Note: All of them for the same transaction are the same). Maybe only pass it with the first animation property.
  3. Maybe we can remove any potential duplicates from TransformData or MotionPathData. Or maybe not.

The benefit are:

  1. For the rest layers::Animations, their TransformData are Nothing(),
    so we can avoid any posisible copy.
  2. In the compositor, PropertyAniamtionGroup uses UniquePtr to hold the
    TransformData in the first element, and the rest elements don't need
    to copy/allocalate memery for this duplicated data.

So we don't need to create motion path data if there is no offset-path style
and no animations of offset-path.

To avoid the ambiguous name because we also have layers::MotionPathData.

Pushed by boris.chiou@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/e9462ce8f669
Keep TransformData only in the first element when passing animation data through IPC. r=hiro
https://hg.mozilla.org/integration/autoland/rev/88869acebf28
Split TransformData into 2 parts - transform data and motion path data. r=hiro
https://hg.mozilla.org/integration/autoland/rev/3b89f8acd826
Rename mozilla::MotionPathData as mozilla::ResolvedMotionPathData. r=hiro
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: