Closed Bug 1580711 Opened 5 years ago Closed 5 years ago

Refactor storage of primitive instances into primitive clusters

Categories

(Core :: Graphics: WebRender, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: gw, Assigned: gw)

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → gwatson

Previously, primitive lists were stored as:

PicturePrimitive
PrimitiveList
[PrimitiveInstance]
[PrimitiveCluster]
[PictureIndices]

Each primitive instance contained a spatial node index and an
index into the primitive cluster it belongs to.

Now, the instances in a primitive list are stored as:

PicturePrimitive
PrimitiveList
[PrimitiveCluster]
[PrimitiveInstance]

This provides a number of advantages:

  • Size of the PrimitiveInstance struct is smaller.
  • No need to maintain a separate PictureIndices list.
  • Easy and fast to skip the array, finding pictures or scroll root changes.
  • Much faster to split and reorder PrimitiveList structures.

This patch is refactoring only, it doesn't contain any functional
changes. As we enable multiple picture caching slices, we need to
be able to split and reorder PrimitiveLists. Storing the primitive
instances in this way makes that process much more efficient than
it currently is.

Pushed by gwatson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/da7b63b27480
Refactor storage of primitive instances into primitive clusters. r=nical
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: