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

Issue 1414533003: Make ui::Compositor BeginFrame subscription robust (Closed)

Created:
5 years, 2 months ago by jdduke (slow)
Modified:
5 years, 2 months ago
Reviewers:
danakj, brianderson
CC:
chromium-reviews, Ian Vollick, sievers+watch_chromium.org, jbauman+watch_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, cc-bugs_chromium.org, mithro-old
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make ui::Compositor BeginFrame subscription robust The current logic for removing a ui::Compositor's BeginFrame observer while dispatching the BeginFrame signal is broken. Make it robust by using an ObserverList. BUG=394562 Committed: https://crrev.com/7620c3c8de8b82db289524a767751f6228bc9293 Cr-Commit-Position: refs/heads/master@{#355649}

Patch Set 1 #

Patch Set 2 : Test #

Total comments: 2

Patch Set 3 : Proper unsubscribe #

Total comments: 13

Patch Set 4 : Cleanup test, add comment, move unsubscription #

Patch Set 5 : Cleanup comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -29 lines) Patch
M ui/compositor/compositor.h View 2 chunks +2 lines, -2 lines 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 3 chunks +18 lines, -19 lines 0 comments Download
M ui/compositor/compositor_unittest.cc View 1 2 3 3 chunks +74 lines, -8 lines 0 comments Download

Messages

Total messages: 21 (4 generated)
jdduke (slow)
Dana could you take a look? Nasty bugs here, ran into it playing with vsync-aligned ...
5 years, 2 months ago (2015-10-19 22:43:01 UTC) #2
danakj
oops forgot to review this.. looking..
5 years, 2 months ago (2015-10-21 20:15:01 UTC) #3
danakj
The bug this points to is pretty general. Why do we want to allow removing ...
5 years, 2 months ago (2015-10-21 20:18:40 UTC) #5
jdduke (slow)
On 2015/10/21 20:18:40, danakj wrote: > The bug this points to is pretty general. Why ...
5 years, 2 months ago (2015-10-21 20:22:01 UTC) #6
danakj
https://codereview.chromium.org/1414533003/diff/20001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (right): https://codereview.chromium.org/1414533003/diff/20001/ui/compositor/compositor.cc#newcode370 ui/compositor/compositor.cc:370: host_->SetChildrenNeedBeginFrames(false); What if might_have is true, but actually this ...
5 years, 2 months ago (2015-10-21 20:23:51 UTC) #7
jdduke (slow)
https://codereview.chromium.org/1414533003/diff/20001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (right): https://codereview.chromium.org/1414533003/diff/20001/ui/compositor/compositor.cc#newcode370 ui/compositor/compositor.cc:370: host_->SetChildrenNeedBeginFrames(false); On 2015/10/21 20:23:51, danakj wrote: > What if ...
5 years, 2 months ago (2015-10-21 20:48:12 UTC) #8
brianderson
Sorry you had to debug this Jared. Simon initially had this as an ObserverList and ...
5 years, 2 months ago (2015-10-21 22:50:30 UTC) #9
brianderson
lgtm I have a few nits, but they're not super important since this logic is ...
5 years, 2 months ago (2015-10-21 23:12:59 UTC) #10
jdduke (slow)
https://codereview.chromium.org/1414533003/diff/40001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (left): https://codereview.chromium.org/1414533003/diff/40001/ui/compositor/compositor.cc#oldcode197 ui/compositor/compositor.cc:197: DCHECK(begin_frame_observer_list_.empty()); On 2015/10/21 23:12:59, brianderson wrote: > Why is ...
5 years, 2 months ago (2015-10-21 23:46:16 UTC) #11
danakj
https://codereview.chromium.org/1414533003/diff/40001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (right): https://codereview.chromium.org/1414533003/diff/40001/ui/compositor/compositor.cc#newcode373 ui/compositor/compositor.cc:373: if (!begin_frame_observer_list_.might_have_observers()) { Do you need to do this ...
5 years, 2 months ago (2015-10-22 18:36:00 UTC) #12
jdduke (slow)
https://codereview.chromium.org/1414533003/diff/40001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (right): https://codereview.chromium.org/1414533003/diff/40001/ui/compositor/compositor.cc#newcode373 ui/compositor/compositor.cc:373: if (!begin_frame_observer_list_.might_have_observers()) { On 2015/10/22 18:35:59, danakj wrote: > ...
5 years, 2 months ago (2015-10-22 18:39:00 UTC) #13
jdduke (slow)
Added some comments, moved the unsubscribe. https://chromiumcodereview.appspot.com/1414533003/diff/40001/ui/compositor/compositor_unittest.cc File ui/compositor/compositor_unittest.cc (right): https://chromiumcodereview.appspot.com/1414533003/diff/40001/ui/compositor/compositor_unittest.cc#newcode167 ui/compositor/compositor_unittest.cc:167: EXPECT_CALL(test_observer2, OnSendBeginFrame(expected_args)).Times(0); On ...
5 years, 2 months ago (2015-10-22 19:13:19 UTC) #14
danakj
Thanks. LGTM. Maybe ping brian make sure he's okay with only the one unsubscribe.
5 years, 2 months ago (2015-10-22 20:39:34 UTC) #15
jdduke (slow)
On 2015/10/22 20:39:34, danakj wrote: > Thanks. LGTM. Maybe ping brian make sure he's okay ...
5 years, 2 months ago (2015-10-22 20:48:56 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1414533003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1414533003/80001
5 years, 2 months ago (2015-10-22 20:49:22 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 2 months ago (2015-10-22 21:46:55 UTC) #20
commit-bot: I haz the power
5 years, 2 months ago (2015-10-22 21:47:49 UTC) #21
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/7620c3c8de8b82db289524a767751f6228bc9293
Cr-Commit-Position: refs/heads/master@{#355649}

Powered by Google App Engine
This is Rietveld 408576698