Closed Bug 1332567 Opened 3 years ago Closed 3 years ago

Make it faster to serialize layer attribute changes

Categories

(Core :: Graphics: Layers, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: dvander, Assigned: dvander)

References

Details

Attachments

(6 files)

It's slow to serialize CommonLayerAttributes when there are many layers. We can improve it by grouping trivially serializable attributes together. The more types of fields we can group together like this, the easier it will be to eliminate expensive deserialization on the compositor side as well.
Move ScrollDirection LayersTypes.h and give it a proper enum class type.
Attachment #8828681 - Flags: review?(bugmail)
No reason to use this union wrapper in CommonLayerAttributes.
Attachment #8828682 - Flags: review?(matt.woodrow)
This lets us easily serialize stuff between Edits and Paints, which must come last.
Attachment #8828683 - Flags: review?(matt.woodrow)
This splits OpSetLayerAttributes out of Edit. Since it's a huge struct, this will reduce the amount of memory traffic needed when building the transaction message.
Attachment #8828684 - Flags: review?(matt.woodrow)
This moves plain-old-data attributes into a SimpleLayerAttributes class, with the goal that it can just be memcpy'd rather than serialized field-by-field.
Attachment #8828685 - Flags: review?(matt.woodrow)
Attachment #8828685 - Attachment description: part 5, factor our plain-old-data attributes → part 5, factor out plain-old-data attributes
Attachment #8828682 - Flags: review?(matt.woodrow) → review+
Attachment #8828683 - Flags: review?(matt.woodrow) → review+
Attachment #8828684 - Flags: review?(matt.woodrow) → review+
Attachment #8828685 - Flags: review?(matt.woodrow) → review+
Attachment #8828686 - Flags: review?(matt.woodrow) → review+
Pushed by danderson@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/91bff1c46801
Move ScrollDirection to LayersTypes.h and make it a proper enum. (bug 1332567 part 1, r=kats)
https://hg.mozilla.org/integration/mozilla-inbound/rev/e9befbf971c2
Don't use TransformMatrix in CommonLayerAttributes. (bug 1332567 part 2, r=mattwoodrow)
https://hg.mozilla.org/integration/mozilla-inbound/rev/3a4b81fa3f07
Lump Paint operations separately from Edit operations. (bug 1332567 part 3, r=mattwoodrow)
https://hg.mozilla.org/integration/mozilla-inbound/rev/485841a2f637
Move OpSetLayerAttributes out of the Edit vector. (bug 1332567 part 4, r=mattwoodrow)
https://hg.mozilla.org/integration/mozilla-inbound/rev/810b96fdc671
Factor POD attributes of Layers into a SimpleLayerAttributes class. (bug 1332567 part 5, r=mattwoodrow)
https://hg.mozilla.org/integration/mozilla-inbound/rev/44f9535628fd
Send SimpleLayerAttributes separately from CommonLayerAttributes. (bug 1332567 part 6, r=mattwoodrow)
Depends on: 1334715
Depends on: 1334801
You need to log in before you can comment on or make changes to this bug.