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.
BUG=638068
Review-Url: https://codereview.chromium.org/2253423003
Cr-Commit-Position: refs/heads/master@{#413244}
(cherry picked from commit f859be05a8db1f6301119cd9dfd58d7ddd75ee22)
Committed: https://chromium.googlesource.com/chromium/src/+/f66182335a8d477501e0657cafc3600ae9896e98
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|
||||||||||||||||||||||||||||