Closed Bug 1473137 Opened 4 years ago Closed 4 years ago

PaintedLayerData::mOpacityIndices is allocated on the heap

Categories

(Core :: Web Painting, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: bas.schouten, Assigned: bas.schouten)

Details

Attachments

(2 files)

Most of the time this is small, AutoTArray would be a more appropriate type of array.
Comment on attachment 8989542 [details]
Bug 1473137: Change mOpacityIndices to be an AutoTArray.

https://reviewboard.mozilla.org/r/254562/#review261408
Attachment #8989542 - Flags: review?(matt.woodrow) → review+
The other version failed because PaintedLayerData is in an array, and if we memmove to resize, then we corrupt the AutoTArray.

There can only ever be one set of opacity indices alive at once, so the new patch just moves the whole array onto the stack instead.
Comment on attachment 8989589 [details]
Bug 1473137 - Convert mOpacityIndices into a stack-based vector with preallocated storage to avoid allocations.

https://reviewboard.mozilla.org/r/254608/#review261484
Attachment #8989589 - Flags: review?(jnicol) → review+
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6a228e47a3bd
Convert mOpacityIndices into a stack-based vector with preallocated storage to avoid allocations. r=jnicol
https://hg.mozilla.org/mozilla-central/rev/6a228e47a3bd
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.