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

Issue 68893031: Unifies LayerTreeHost::SetNeedsUpdateLayers and SetNeedsAnimate (Closed)

Created:
7 years, 1 month ago by trchen
Modified:
7 years ago
CC:
chromium-reviews, joi+watch-content_chromium.org, piman+watch_chromium.org, cc-bugs_chromium.org, jam, darin-cc_chromium.org
Visibility:
Public.

Description

Unifies LayerTreeHost::SetNeedsUpdateLayers and SetNeedsAnimate [2/2] Unifies LayerTreeHost::SetNeedsUpdateLayers and SetNeedsAnimate They basically do the same thing except that SetNeedsAnimate makes the next commit non-cancellable. However there is really no reason why SetNeedsAnimate need to enforce a commit even if no tiles are updated and no layer properties changed. SetNeedsAnimate is thus merged into SetNeedsUpdateLayers. The proper use of it is when there are potential layout/tile changes, we can use it to defer calculation until the next frame. A commit will be scheduled but can be cancelled if no updates are needed after calculation. This part of the patch changes code behavior slightly. SingleThreadProxy::SetNeedsUpdateLayers was originally implemented as RenderWidget::ScheduleComposite but now it is RenderWidget::ScheduleAnimation. ThreadProxy::SetNeedsAnimate was non-cancellable but is now cancellable. [1/2] Cleanup RenderWidget::scheduleComposite/scheduleAnimation scheduleComposite has been renamed to ScheduleComposite as it is no longer a part of WebWidgetClient API. scheduleAnimation has been renamed to ScheduleAnimation. The semantics is to schedule a composite and also (potentially) animating WebWidget. A new WebWidgetClient API scheduleUpdate has been added, to replace the old scheduleAnimation. The semantics is to notify the embedder that something in the WebWidget may change in 0 seconds. (i.e. it is allowed to be called during a redraw, in such case another redraw will be scheduled after frame delay. This part of the patch should not change code behavior. BUG=316929 R=danakj,jamesr,piman Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=240008

Patch Set 1 #

Patch Set 2 : okay let's call it SetNeedsUpdateLayers #

Total comments: 2

Patch Set 3 : fixed cc animation unittest #

Total comments: 10

Patch Set 4 : revise as recommended #

Patch Set 5 : rebased & revised #

Patch Set 6 : fix bug #

Patch Set 7 : rebased #

Patch Set 8 : should use is_accelerated_compositing_active_ instead of compositor_ #

Patch Set 9 : rebase #

Patch Set 10 : fix forced redraw breakage #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -125 lines) Patch
M cc/test/fake_proxy.h View 1 4 1 chunk +0 lines, -1 line 0 comments Download
M cc/test/layer_tree_test.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/layer_tree_test.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 3 4 5 6 7 8 9 2 chunks +0 lines, -9 lines 0 comments Download
M cc/trees/layer_tree_host_perftest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -11 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_animation.cc View 1 2 3 4 5 6 7 8 8 chunks +26 lines, -17 lines 0 comments Download
M cc/trees/proxy.h View 1 4 1 chunk +0 lines, -1 line 0 comments Download
M cc/trees/single_thread_proxy.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -6 lines 0 comments Download
M cc/trees/thread_proxy.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -4 lines 0 comments Download
M cc/trees/thread_proxy.cc View 1 2 3 4 5 6 7 8 9 6 chunks +19 lines, -27 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.h View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 7 8 9 3 chunks +16 lines, -6 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_widget.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -2 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 6 chunks +40 lines, -29 lines 0 comments Download
M content/test/web_layer_tree_view_impl_for_testing.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M content/test/web_layer_tree_view_impl_for_testing.cc View 1 2 1 chunk +9 lines, -2 lines 0 comments Download

Messages

Total messages: 45 (0 generated)
trchen
7 years, 1 month ago (2013-11-16 04:22:52 UTC) #1
danakj
Cool plan, but I propose that we not rename SetNeedsUpdateLayers, which will keep this patch ...
7 years, 1 month ago (2013-11-18 09:09:50 UTC) #2
trchen
On 2013/11/18 09:09:50, danakj wrote: > Cool plan, but I propose that we not rename ...
7 years, 1 month ago (2013-11-18 23:44:41 UTC) #3
jamesr
https://codereview.chromium.org/68893031/diff/50001/content/renderer/gpu/render_widget_compositor.cc File content/renderer/gpu/render_widget_compositor.cc (right): https://codereview.chromium.org/68893031/diff/50001/content/renderer/gpu/render_widget_compositor.cc#newcode510 content/renderer/gpu/render_widget_compositor.cc:510: // TODO(trchen): This function is not doing what the ...
7 years, 1 month ago (2013-11-19 00:54:26 UTC) #4
enne (OOO)
https://codereview.chromium.org/68893031/diff/50001/cc/trees/layer_tree_host_unittest_animation.cc File cc/trees/layer_tree_host_unittest_animation.cc (right): https://codereview.chromium.org/68893031/diff/50001/cc/trees/layer_tree_host_unittest_animation.cc#newcode729 cc/trees/layer_tree_host_unittest_animation.cc:729: // TODO(trchen): This test is broken. Add a FakeContentLayer ...
7 years, 1 month ago (2013-11-19 01:48:46 UTC) #5
trchen
On 2013/11/19 00:54:26, jamesr wrote: > https://codereview.chromium.org/68893031/diff/50001/content/renderer/gpu/render_widget_compositor.cc > File content/renderer/gpu/render_widget_compositor.cc (right): > > https://codereview.chromium.org/68893031/diff/50001/content/renderer/gpu/render_widget_compositor.cc#newcode510 > ...
7 years, 1 month ago (2013-11-19 02:33:06 UTC) #6
jamesr
On 2013/11/19 02:33:06, trchen wrote: > On 2013/11/19 00:54:26, jamesr wrote: > > > https://codereview.chromium.org/68893031/diff/50001/content/renderer/gpu/render_widget_compositor.cc ...
7 years, 1 month ago (2013-11-19 02:35:31 UTC) #7
trchen
On 2013/11/19 02:35:31, jamesr wrote: > On 2013/11/19 02:33:06, trchen wrote: > > On 2013/11/19 ...
7 years, 1 month ago (2013-11-19 02:51:27 UTC) #8
trchen
Hello reviewers, here is an updated patch. The broken cc animation unittest has been fixed. ...
7 years ago (2013-12-05 04:20:27 UTC) #9
danakj
https://codereview.chromium.org/68893031/diff/160001/cc/trees/single_thread_proxy.cc File cc/trees/single_thread_proxy.cc (right): https://codereview.chromium.org/68893031/diff/160001/cc/trees/single_thread_proxy.cc#newcode181 cc/trees/single_thread_proxy.cc:181: client_->ScheduleAnimation(); Should we be renaming this ScheduleAnimation() function as ...
7 years ago (2013-12-05 18:28:16 UTC) #10
danakj
+ajuma for sanity checking me in threadproxy
7 years ago (2013-12-05 18:28:32 UTC) #11
ajuma
https://codereview.chromium.org/68893031/diff/160001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/68893031/diff/160001/cc/trees/thread_proxy.cc#newcode860 cc/trees/thread_proxy.cc:860: // when commit_request_sent_to_impl_thread_ = true. We need to force ...
7 years ago (2013-12-05 19:01:06 UTC) #12
danakj
https://codereview.chromium.org/68893031/diff/160001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/68893031/diff/160001/cc/trees/thread_proxy.cc#newcode860 cc/trees/thread_proxy.cc:860: // when commit_request_sent_to_impl_thread_ = true. We need to force ...
7 years ago (2013-12-05 19:18:50 UTC) #13
trchen
https://codereview.chromium.org/68893031/diff/160001/cc/trees/single_thread_proxy.cc File cc/trees/single_thread_proxy.cc (right): https://codereview.chromium.org/68893031/diff/160001/cc/trees/single_thread_proxy.cc#newcode181 cc/trees/single_thread_proxy.cc:181: client_->ScheduleAnimation(); On 2013/12/05 18:28:16, danakj wrote: > Should we ...
7 years ago (2013-12-06 03:42:38 UTC) #14
danakj
Sorry for the confusion *^^*. After the discussion I think PS3 LGTM. I'd prefer to ...
7 years ago (2013-12-06 17:21:32 UTC) #15
trchen
On 2013/12/06 17:21:32, danakj wrote: > Sorry for the confusion *^^*. After the discussion I ...
7 years ago (2013-12-06 22:13:28 UTC) #16
trchen
Hello James, does the content/renderer change looks okay to you? Thanks!
7 years ago (2013-12-06 22:50:33 UTC) #17
jamesr
lgtm! This looks great. As a sanity check could you confirm that this page: http://webstuff.nfshost.com/anim-timing/raftime.html ...
7 years ago (2013-12-06 22:55:24 UTC) #18
trchen
On 2013/12/06 22:55:24, jamesr wrote: > lgtm! This looks great. As a sanity check could ...
7 years ago (2013-12-06 23:21:13 UTC) #19
jamesr
On 2013/12/06 23:21:13, trchen wrote: > Oops it breaks single-thread compositing mode. Commits are continuously ...
7 years ago (2013-12-07 00:19:22 UTC) #20
trchen
On 2013/12/06 23:21:13, trchen wrote: > On 2013/12/06 22:55:24, jamesr wrote: > > lgtm! This ...
7 years ago (2013-12-07 00:21:08 UTC) #21
jamesr
Yeah, that 1x1 nonsense. lgtm!
7 years ago (2013-12-07 00:22:04 UTC) #22
trchen
Hello Antoine, can I have a owner approval for content/test? Thank you!
7 years ago (2013-12-07 00:26:30 UTC) #23
piman
lgtm
7 years ago (2013-12-07 01:08:57 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/trchen@chromium.org/68893031/210001
7 years ago (2013-12-07 02:13:31 UTC) #25
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=181861
7 years ago (2013-12-07 04:11:39 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/trchen@chromium.org/68893031/210001
7 years ago (2013-12-09 20:52:41 UTC) #27
commit-bot: I haz the power
Failed to apply patch for cc/trees/layer_tree_host.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years ago (2013-12-09 20:52:51 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/trchen@chromium.org/68893031/230001
7 years ago (2013-12-09 21:32:57 UTC) #29
commit-bot: I haz the power
Failed to trigger a try job on win_rel HTTP Error 400: Bad Request
7 years ago (2013-12-10 01:19:55 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/trchen@chromium.org/68893031/270001
7 years ago (2013-12-10 01:23:39 UTC) #31
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) base_unittests, browser_tests, interactive_ui_tests, net_unittests, unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=199318
7 years ago (2013-12-10 02:14:41 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/trchen@chromium.org/68893031/230001
7 years ago (2013-12-10 17:27:04 UTC) #33
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=182676
7 years ago (2013-12-10 18:37:30 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/trchen@chromium.org/68893031/230001
7 years ago (2013-12-10 18:59:47 UTC) #35
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) interactive_ui_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=182738
7 years ago (2013-12-10 20:22:25 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/trchen@chromium.org/68893031/230001
7 years ago (2013-12-10 21:16:44 UTC) #37
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=182790
7 years ago (2013-12-10 22:36:18 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/trchen@chromium.org/68893031/290001
7 years ago (2013-12-10 22:55:36 UTC) #39
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) base_unittests, browser_tests, interactive_ui_tests, net_unittests, unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=201521
7 years ago (2013-12-10 23:20:12 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/trchen@chromium.org/68893031/310001
7 years ago (2013-12-10 23:25:07 UTC) #41
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) base_unittests, browser_tests, interactive_ui_tests, net_unittests, unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=201549
7 years ago (2013-12-10 23:51:26 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/trchen@chromium.org/68893031/310001
7 years ago (2013-12-10 23:56:39 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/trchen@chromium.org/68893031/330001
7 years ago (2013-12-11 01:33:39 UTC) #44
commit-bot: I haz the power
7 years ago (2013-12-11 04:11:37 UTC) #45
Message was sent while issue was closed.
Change committed as 240008

Powered by Google App Engine
This is Rietveld 408576698