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

Issue 2253423003: 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:
Changwan Ryu
CC:
chromium-reviews, David Trainor- moved to gerrit, no sievers, Theresa
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
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 Committed: https://crrev.com/f859be05a8db1f6301119cd9dfd58d7ddd75ee22 Cr-Commit-Position: refs/heads/master@{#413244}

Patch Set 1 #

Patch Set 2 : Tweaks #

Total comments: 6

Patch Set 3 : Code review comments #

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 2 1 chunk +3 lines, -8 lines 0 comments Download
M chrome/browser/android/compositor/scene_layer/tab_list_scene_layer.cc View 1 2 5 chunks +29 lines, -41 lines 0 comments Download

Messages

Total messages: 19 (13 generated)
aelias_OOO_until_Jul13
Hi changwan@, PTAL.
4 years, 4 months ago (2016-08-18 23:10:39 UTC) #9
Changwan Ryu
lgtm w/ nits nice, this improves readability as well! https://codereview.chromium.org/2253423003/diff/20001/chrome/browser/android/compositor/scene_layer/tab_list_scene_layer.cc File chrome/browser/android/compositor/scene_layer/tab_list_scene_layer.cc (right): https://codereview.chromium.org/2253423003/diff/20001/chrome/browser/android/compositor/scene_layer/tab_list_scene_layer.cc#newcode38 chrome/browser/android/compositor/scene_layer/tab_list_scene_layer.cc:38: ...
4 years, 4 months ago (2016-08-19 06:55:37 UTC) #12
aelias_OOO_until_Jul13
https://codereview.chromium.org/2253423003/diff/20001/chrome/browser/android/compositor/scene_layer/tab_list_scene_layer.cc File chrome/browser/android/compositor/scene_layer/tab_list_scene_layer.cc (right): https://codereview.chromium.org/2253423003/diff/20001/chrome/browser/android/compositor/scene_layer/tab_list_scene_layer.cc#newcode38 chrome/browser/android/compositor/scene_layer/tab_list_scene_layer.cc:38: tab.second->layer()->RemoveFromParent(); On 2016/08/19 at 06:55:37, Changwan Ryu wrote: > ...
4 years, 4 months ago (2016-08-19 20:38:29 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2253423003/40001
4 years, 4 months ago (2016-08-19 20:40:18 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 4 months ago (2016-08-19 21:30:40 UTC) #17
commit-bot: I haz the power
4 years, 4 months ago (2016-08-19 21:41:21 UTC) #19
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f859be05a8db1f6301119cd9dfd58d7ddd75ee22
Cr-Commit-Position: refs/heads/master@{#413244}

Powered by Google App Engine
This is Rietveld 408576698