Chromium Code Reviews
DescriptionMake TabLayer recycling sticky to tab_id.
TabListSceneLayer is the parent of all currently visible phone tab
switcher CC layers. It prefers to reuse existing layers instead of
recreating them from scratch.
However, the old logic was vector-based and had no guaranteed
correlation to tab ids, so when a layer in the middle became covered and
invisible, all layers after it were suddenly repurposed to display a
different tab than on the previous frame (and the last layer in the list
was destroyed, not the layer that became invisible). The thumbnail
subsystems have problems handling this switchover perfectly and
sometimes flicker white or black for one frame, and this is also
inefficient.
This patch replaces the vector of TabLayers with a map sorted by id, so
that when a TabLayer becomes invisible, that one is removed without
disturbing any of the other layers.
[edited to add more #includes: see http://crbug.com/640352]
BUG=638068, 640352
Review-Url: https://codereview.chromium.org/2253423003
Cr-Commit-Position: refs/heads/master@{#413244}
Committed: https://chromium.googlesource.com/chromium/src/+/28162ee142c9e5008fe16a3feb53734d89522f92
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|
||||||||||||||||||||||||||||