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

Issue 1474993003: Ensure View invalidates Widget::root_layers_ when LayerOwner::RecreateLayer is invoked (Closed)

Created:
5 years ago by tapted
Modified:
5 years ago
Reviewers:
sky
CC:
chromium-reviews, tdanderson+views_chromium.org, sadrul, Ian Vollick, tfarina, sievers+watch_chromium.org, jbauman+watch_chromium.org, piman+watch_chromium.org, kalyank, danakj+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure View invalidates Widget::root_layers_ when LayerOwner::RecreateLayer is invoked Adding a Layer to a subview in a Widget currently causes functions like wm::RecreateLayers() to leave stale copies of the old layer inside the "root layer" cache in views::Widget. This happens because views::View doesn't have a signal when its layer changes via LayerOwner::RecreateLayer() and so it fails to call Widget::UpdateRootLayers(). To fix, allow LayerOwner::RecreateLayer() to be overridden by View. While a LayerOwnerDelegate also receives a notification when RecreateLayer() completes, View can't also be a LayerOwnerDelegate without causing conflicts with subclasses of views::View which already are. BUG=546846, 391646 TEST=Updated views_unittests ViewAuraTest.RecreateLayersWithWindows with checks that would fail prior to this fix. Committed: https://crrev.com/e540e65b1024433c088933f558095a5e849dea25 Cr-Commit-Position: refs/heads/master@{#362535}

Patch Set 1 #

Patch Set 2 : clearer test #

Patch Set 3 : ordering is hard #

Total comments: 2

Patch Set 4 : Update WindowStateTest #

Patch Set 5 : Update ViewAuraTest.RecreateLayersWithWindows #

Patch Set 6 : Rollback ash/wm/window_state_unittest.cc - redundant now #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -2 lines) Patch
M ui/compositor/layer_owner.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/view.h View 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/view.cc View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M ui/views/view_unittest_aura.cc View 1 2 3 4 5 2 chunks +23 lines, -1 line 0 comments Download

Messages

Total messages: 15 (8 generated)
tapted
Hi sky, please take a look (this was the cause of the asan failures with ...
5 years ago (2015-11-27 03:08:40 UTC) #3
sky
https://codereview.chromium.org/1474993003/diff/40001/ash/wm/window_state_unittest.cc File ash/wm/window_state_unittest.cc (right): https://codereview.chromium.org/1474993003/diff/40001/ash/wm/window_state_unittest.cc#newcode342 ash/wm/window_state_unittest.cc:342: TEST_F(WindowStateTest, RecreateLayersDuringCrossfade) { This test is ok, but you're ...
5 years ago (2015-11-30 16:52:09 UTC) #5
tapted
https://codereview.chromium.org/1474993003/diff/40001/ash/wm/window_state_unittest.cc File ash/wm/window_state_unittest.cc (right): https://codereview.chromium.org/1474993003/diff/40001/ash/wm/window_state_unittest.cc#newcode342 ash/wm/window_state_unittest.cc:342: TEST_F(WindowStateTest, RecreateLayersDuringCrossfade) { On 2015/11/30 16:52:09, sky wrote: > ...
5 years ago (2015-12-01 04:34:43 UTC) #8
sky
LGTM
5 years ago (2015-12-01 15:12:25 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1474993003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1474993003/120001
5 years ago (2015-12-01 22:12:38 UTC) #11
commit-bot: I haz the power
Committed patchset #6 (id:120001)
5 years ago (2015-12-01 22:41:08 UTC) #13
commit-bot: I haz the power
5 years ago (2015-12-01 22:44:23 UTC) #15
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/e540e65b1024433c088933f558095a5e849dea25
Cr-Commit-Position: refs/heads/master@{#362535}

Powered by Google App Engine
This is Rietveld 408576698