Closed Bug 1618319 Opened 4 years ago Closed 4 years ago

Simplify webrender::intern::UpdateList

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla75
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.

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).

Assignee: nobody → jimb
Status: NEW → ASSIGNED
Pushed by jblandy@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/06e238addde2
Segregate intern::UpdateList insertions and removals. r=gw
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: