Bug 1614655 - Part 2: Allow 1:n mapping of Gecko - WR display items r…
…=jrmuizel This patch changes the underlying storage for WR display items in DisplayItemCache from Vec<Option<CachedDisplayItem> to Vec<Vec<CachedDisplayItem>>. This allows storing multiple WebRender display items for one Gecko display item. The storage is populated by traversing BuiltDisplayList extra data portion in display list format, which is roughly as follows: RetainedItems(key k1) Item1(..) RetainedItems(key k2) ItemN(..) ItemN+1(..) This would store Item1 under key k1, and ItemN and ItemN+1 under the key k2, where k1 and k2 are arbitrary unique identifiers (currently of type uint16_t). The entries in the storage are accessed by DisplayItemCache::get_iterator(key), which is called by BuiltDisplayListIter, whenever it encounters a display item DisplayItem::ReuseItems(key). Differential Revision: https://phabricator.services.mozilla.com/D66443 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/cc263e909c61d2d9c7d7cc1ccb8d24c8d09bf5b7