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

Issue 23593003: cc: Avoid updating animations in the background without an active tree (Closed)

Created:
7 years, 3 months ago by brianderson
Modified:
7 years, 3 months ago
Reviewers:
danakj, enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org, ajuma, Ian Vollick
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

cc: Avoid updating animations in the background without an active tree This patch prevents LTHI from background ticking animations if there is no active tree to animate since animating with no active tree will often result in segfaults. BUG=280706 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=220462

Patch Set 1 #

Patch Set 2 : alternate method #

Total comments: 2

Patch Set 3 : rebase, re-enable tests #

Total comments: 2

Patch Set 4 : Add DCHECKs, fix SingleThreadProxy #

Total comments: 1

Patch Set 5 : add test #

Patch Set 6 : fix clang #

Total comments: 5

Patch Set 7 : Address comments; Check more things; Fix races; #

Patch Set 8 : Remove remaining us of "null root layer" #

Total comments: 3

Patch Set 9 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -16 lines) Patch
M cc/test/layer_tree_test.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/layer_tree_test.cc View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 4 chunks +9 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_animation.cc View 1 2 3 4 5 6 7 8 2 chunks +132 lines, -3 lines 0 comments Download
M cc/trees/single_thread_proxy.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 3 4 4 chunks +10 lines, -4 lines 0 comments Download
M cc/trees/thread_proxy.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/thread_proxy.cc View 1 6 chunks +12 lines, -8 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
brianderson
7 years, 3 months ago (2013-08-28 22:44:09 UTC) #1
danakj
It seems like maybe ThreadProxy::SetVisibleOnImplThread() is enabling ticking when it shouldn't because scheduler_on_impl_thread_->WillDrawIfNeeded() is returning ...
7 years, 3 months ago (2013-08-28 22:47:00 UTC) #2
brianderson
I need to rebase and re-enable the test that this fixes. I've been running for ...
7 years, 3 months ago (2013-08-28 22:47:10 UTC) #3
danakj
On 2013/08/28 22:47:00, danakj wrote: > It seems like maybe ThreadProxy::SetVisibleOnImplThread() is enabling ticking There's ...
7 years, 3 months ago (2013-08-28 22:47:40 UTC) #4
brianderson
On 2013/08/28 22:47:00, danakj wrote: > It seems like maybe ThreadProxy::SetVisibleOnImplThread() is enabling ticking > ...
7 years, 3 months ago (2013-08-28 22:56:35 UTC) #5
brianderson
PTAL, this version also appears to avoid the segfault.
7 years, 3 months ago (2013-08-28 23:34:22 UTC) #6
danakj
https://codereview.chromium.org/23593003/diff/8001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/23593003/diff/8001/cc/trees/thread_proxy.cc#newcode1008 cc/trees/thread_proxy.cc:1008: UpdateBackgroundAnimateTicking(); Why is this change correct, when it used ...
7 years, 3 months ago (2013-08-28 23:36:13 UTC) #7
brianderson
Rebasing to re-enable the test now. https://codereview.chromium.org/23593003/diff/8001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/23593003/diff/8001/cc/trees/thread_proxy.cc#newcode1008 cc/trees/thread_proxy.cc:1008: UpdateBackgroundAnimateTicking(); On 2013/08/28 ...
7 years, 3 months ago (2013-08-28 23:42:18 UTC) #8
danakj
Ok, I was worried that maybe the animation registrar should not have active animation controllers ...
7 years, 3 months ago (2013-08-28 23:49:09 UTC) #9
enne (OOO)
https://codereview.chromium.org/23593003/diff/14001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/23593003/diff/14001/cc/trees/thread_proxy.cc#newcode248 cc/trees/thread_proxy.cc:248: layer_tree_host_impl_->active_tree()->root_layer()); This seems a little redundant. Scheduler::WillDrawIfNeeded returns !SchedulerStateMachine::PendingDrawsShouldBeAborted ...
7 years, 3 months ago (2013-08-29 00:10:10 UTC) #10
brianderson
https://codereview.chromium.org/23593003/diff/14001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/23593003/diff/14001/cc/trees/thread_proxy.cc#newcode248 cc/trees/thread_proxy.cc:248: layer_tree_host_impl_->active_tree()->root_layer()); On 2013/08/29 00:10:10, enne wrote: > This seems ...
7 years, 3 months ago (2013-08-29 00:16:03 UTC) #11
brianderson
On 2013/08/28 23:49:09, danakj wrote: > Ok, I was worried that maybe the animation registrar ...
7 years, 3 months ago (2013-08-29 00:36:27 UTC) #12
danakj
On Wed, Aug 28, 2013 at 8:36 PM, <brianderson@chromium.org> wrote: > On 2013/08/28 23:49:09, danakj ...
7 years, 3 months ago (2013-08-29 00:44:57 UTC) #13
brianderson
On 2013/08/29 00:44:57, danakj wrote: > On Wed, Aug 28, 2013 at 8:36 PM, <mailto:brianderson@chromium.org> ...
7 years, 3 months ago (2013-08-29 00:50:10 UTC) #14
brianderson
Hmm. I suppose that, in the SingleThreadProxy case, the animation registrar would be empty if ...
7 years, 3 months ago (2013-08-29 01:03:09 UTC) #15
danakj
OK, the dchecks looks reasonable. Do you have a test coming that would trigger them ...
7 years, 3 months ago (2013-08-29 01:11:02 UTC) #16
brianderson
Ok. Working on a test now.
7 years, 3 months ago (2013-08-29 01:23:22 UTC) #17
brianderson
Added the test.
7 years, 3 months ago (2013-08-29 04:11:51 UTC) #18
danakj
https://codereview.chromium.org/23593003/diff/34001/cc/trees/layer_tree_host_unittest_animation.cc File cc/trees/layer_tree_host_unittest_animation.cc (right): https://codereview.chromium.org/23593003/diff/34001/cc/trees/layer_tree_host_unittest_animation.cc#newcode311 cc/trees/layer_tree_host_unittest_animation.cc:311: // This alternates setting the root tree null and ...
7 years, 3 months ago (2013-08-29 17:22:17 UTC) #19
brianderson
ptal
7 years, 3 months ago (2013-08-29 19:00:36 UTC) #20
danakj
Thanks a lot for your effort, this LGTM. enne@ may need some convincing. To me ...
7 years, 3 months ago (2013-08-29 19:58:19 UTC) #21
enne (OOO)
lgtm2
7 years, 3 months ago (2013-08-29 21:25:52 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/23593003/51002
7 years, 3 months ago (2013-08-29 21:30:18 UTC) #23
commit-bot: I haz the power
7 years, 3 months ago (2013-08-30 01:10:03 UTC) #24
Message was sent while issue was closed.
Change committed as 220462

Powered by Google App Engine
This is Rietveld 408576698