Simplify webrender::intern::UpdateList
Categories
(Core :: Graphics: WebRender, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: jimb, Assigned: jimb)
Details
Attachments
(1 file)
This is a really minor cleanup, but: changing UpdateList
to use separate vectors for insertions and removals simplifies the code, removes the enum discriminant, and removes branches in loops.
Assignee | ||
Comment 1•4 years ago
|
||
Rather than treating webrender::intern::UpdateList as a sequence of operations,
each of which might be an insertion or a removal, and using a side table to
supply extra data for insertions, it's simpler to segregate insertions and
removals into two separate vectors. This avoids the need for an enum whose
discriminant needs to be checked within the loop, and allows a few loops that
are only looking for one kind of operation to skip over the others entirely.
Ultimately, there should be no change in the order in which operations occur. In
practice, the old UpdateList always held a contiguous run of insertions,
followed by a run of removals (removals are consumed by apply_updates directly
after being generated by end_frame_and_get_pending_updates).
Updated•4 years ago
|
Pushed by jblandy@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/06e238addde2 Segregate intern::UpdateList insertions and removals. r=gw
Comment 3•4 years ago
|
||
bugherder |
Description
•