Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Issue 2270563004: Make TabLayer recycling sticky to tab_id. (Closed)

Created:
4 years, 4 months ago by aelias_OOO_until_Jul13
Modified:
4 years, 4 months ago
Reviewers:
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2785
Target Ref:
refs/pending/branch-heads/2785
Project:
chromium
Visibility:
Public.

Description

Make 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -49 lines) Patch
M chrome/browser/android/compositor/scene_layer/tab_list_scene_layer.h View 1 chunk +3 lines, -8 lines 0 comments Download
M chrome/browser/android/compositor/scene_layer/tab_list_scene_layer.cc View 5 chunks +29 lines, -41 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
aelias_OOO_until_Jul13
4 years, 4 months ago (2016-08-23 19:15:23 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
f66182335a8d477501e0657cafc3600ae9896e98.

Powered by Google App Engine
This is Rietveld 408576698