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

Issue 2158973002: cc: Clean up LayerTreeTest and TestHooks. (Closed)

Created:
4 years, 5 months ago by danakj
Modified:
4 years, 5 months ago
Reviewers:
enne (OOO)
CC:
boliu, cc-bugs_chromium.org, chromium-reviews, piman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Clean up LayerTreeTest and TestHooks in cc_unittests. While working on new SwapBuffers test hooks for OutputSurface vs CompositorFrameSink, it became apparent that these two APIs have grown much bigger than they need to be. So I spent some time cleaning them up. 1) All TestHooks are steps on LayerTreeHost/LayerTreeHostImpl. No steps on the proxy exist anymore. I changed tests to use LTHI hooks instead where needed, and had to add one method on LTHI for TestHooks to override. 2) All TestHooks on the compositor thread are (mostly) named __OnThread() and they all take a LayerTreeHostImpl* as a parameter. 3) I deleted the Proxy{Main,Impl}ForTests and friends classes. I had to rewrite the activation-blocked tests to not need to get access to the ProxyImpl* directly, and the rest mostly fell out of point 1 above. 4) I deleted remote_channel_unittest.cc and threaded_channel_unittest.cc as these were not testing logic, just checking that posttask works more or less. I believe the correct way to test the proxies is to test that the LayerTreeHost API behaves as you'd expect, which is what our other tests do. R=enne BUG=606056 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_blink_rel Committed: https://crrev.com/94b7e4fcc1fb51a468d3df292c622905c67405c5 Cr-Commit-Position: refs/heads/master@{#406450}

Patch Set 1 #

Patch Set 2 : proxy-impls: rebase #

Total comments: 1

Patch Set 3 : proxy-impls: deletemore #

Patch Set 4 : proxy-impls: delete-one-more #

Patch Set 5 : proxy-impls: android-build #

Total comments: 13

Patch Set 6 : proxy-impls: logs #

Patch Set 7 : proxy-impls: removetestandhooks #

Patch Set 8 : proxy-impls: NotifyReadyToCommitOnImpl #

Patch Set 9 : proxy-impls: stp #

Patch Set 10 : proxy-impls: test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+470 lines, -1886 lines) Patch
M cc/BUILD.gn View 1 2 3 chunks +0 lines, -11 lines 0 comments Download
M cc/cc_tests.gyp View 1 2 3 chunks +0 lines, -11 lines 0 comments Download
M cc/test/layer_tree_test.h View 1 2 3 4 5 6 7 5 chunks +4 lines, -18 lines 0 comments Download
M cc/test/layer_tree_test.cc View 1 2 3 4 5 6 7 12 chunks +58 lines, -154 lines 0 comments Download
D cc/test/proxy_impl_for_test.h View 1 chunk +0 lines, -74 lines 0 comments Download
D cc/test/proxy_impl_for_test.cc View 1 chunk +0 lines, -152 lines 0 comments Download
D cc/test/proxy_main_for_test.h View 1 chunk +0 lines, -62 lines 0 comments Download
D cc/test/proxy_main_for_test.cc View 1 chunk +0 lines, -108 lines 0 comments Download
D cc/test/remote_channel_impl_for_test.h View 1 chunk +0 lines, -43 lines 0 comments Download
D cc/test/remote_channel_impl_for_test.cc View 1 chunk +0 lines, -44 lines 0 comments Download
M cc/test/test_hooks.h View 1 2 3 4 5 6 7 4 chunks +4 lines, -48 lines 0 comments Download
M cc/test/threaded_channel_for_test.h View 1 2 1 chunk +0 lines, -42 lines 0 comments Download
M cc/test/threaded_channel_for_test.cc View 1 2 1 chunk +0 lines, -40 lines 0 comments Download
M cc/trees/channel_main.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 17 chunks +84 lines, -118 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_animation.cc View 1 2 3 4 5 6 7 2 chunks +9 lines, -7 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_context.cc View 2 chunks +6 lines, -8 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_proxy.cc View 1 2 3 4 5 6 7 1 chunk +212 lines, -204 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_scroll.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_serialization.cc View 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/proxy_impl.h View 1 2 3 4 5 6 7 2 chunks +21 lines, -36 lines 0 comments Download
M cc/trees/proxy_impl.cc View 1 2 3 4 5 6 7 4 chunks +12 lines, -25 lines 0 comments Download
D cc/trees/proxy_impl_unittest.cc View 1 chunk +0 lines, -60 lines 0 comments Download
M cc/trees/proxy_main.h View 1 chunk +11 lines, -14 lines 0 comments Download
M cc/trees/proxy_main.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M cc/trees/remote_channel_impl.h View 1 chunk +1 line, -8 lines 0 comments Download
M cc/trees/remote_channel_impl.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -13 lines 0 comments Download
M cc/trees/remote_channel_main.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
M cc/trees/remote_channel_main.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
D cc/trees/remote_channel_unittest.cc View 1 chunk +0 lines, -257 lines 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/task_runner_provider.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M cc/trees/threaded_channel.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
M cc/trees/threaded_channel.cc View 1 2 3 4 5 6 7 2 chunks +12 lines, -9 lines 0 comments Download
D cc/trees/threaded_channel_unittest.cc View 1 chunk +0 lines, -297 lines 0 comments Download

Messages

Total messages: 53 (38 generated)
danakj
4 years, 5 months ago (2016-07-18 20:45:20 UTC) #4
danakj
https://codereview.chromium.org/2158973002/diff/20001/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/2158973002/diff/20001/cc/trees/layer_tree_host_unittest.cc#newcode2621 cc/trees/layer_tree_host_unittest.cc:2621: class OnDrawOutputSurface : public OutputSurface { +boliu FYI: i ...
4 years, 5 months ago (2016-07-18 21:12:52 UTC) #20
enne (OOO)
https://codereview.chromium.org/2158973002/diff/100001/cc/test/layer_tree_test.cc File cc/test/layer_tree_test.cc (right): https://codereview.chromium.org/2158973002/diff/100001/cc/test/layer_tree_test.cc#newcode420 cc/test/layer_tree_test.cc:420: test_hooks_->DidSetNeedsCommit(); What is this used for? https://codereview.chromium.org/2158973002/diff/100001/cc/test/layer_tree_test.cc#newcode427 cc/test/layer_tree_test.cc:427: test_hooks_->DidSetNeedsUpdateLayers(); ...
4 years, 5 months ago (2016-07-18 21:48:03 UTC) #23
danakj
https://codereview.chromium.org/2158973002/diff/100001/cc/test/layer_tree_test.cc File cc/test/layer_tree_test.cc (right): https://codereview.chromium.org/2158973002/diff/100001/cc/test/layer_tree_test.cc#newcode420 cc/test/layer_tree_test.cc:420: test_hooks_->DidSetNeedsCommit(); On 2016/07/18 21:48:02, enne wrote: > What is ...
4 years, 5 months ago (2016-07-18 23:20:10 UTC) #28
danakj
https://codereview.chromium.org/2158973002/diff/100001/cc/test/layer_tree_test.cc File cc/test/layer_tree_test.cc (right): https://codereview.chromium.org/2158973002/diff/100001/cc/test/layer_tree_test.cc#newcode427 cc/test/layer_tree_test.cc:427: test_hooks_->DidSetNeedsUpdateLayers(); On 2016/07/18 23:20:10, danakj wrote: > On 2016/07/18 ...
4 years, 5 months ago (2016-07-18 23:24:12 UTC) #31
danakj
https://codereview.chromium.org/2158973002/diff/100001/cc/test/layer_tree_test.cc File cc/test/layer_tree_test.cc (right): https://codereview.chromium.org/2158973002/diff/100001/cc/test/layer_tree_test.cc#newcode420 cc/test/layer_tree_test.cc:420: test_hooks_->DidSetNeedsCommit(); On 2016/07/18 23:20:10, danakj wrote: > On 2016/07/18 ...
4 years, 5 months ago (2016-07-19 00:56:24 UTC) #32
enne (OOO)
https://codereview.chromium.org/2158973002/diff/100001/cc/trees/proxy_impl.cc File cc/trees/proxy_impl.cc (right): https://codereview.chromium.org/2158973002/diff/100001/cc/trees/proxy_impl.cc#newcode274 cc/trees/proxy_impl.cc:274: layer_tree_host_impl_->BeginMainFrameCompleted(); On 2016/07/18 at 23:20:10, danakj wrote: > On ...
4 years, 5 months ago (2016-07-19 01:09:00 UTC) #35
danakj
https://codereview.chromium.org/2158973002/diff/100001/cc/trees/proxy_impl.cc File cc/trees/proxy_impl.cc (right): https://codereview.chromium.org/2158973002/diff/100001/cc/trees/proxy_impl.cc#newcode274 cc/trees/proxy_impl.cc:274: layer_tree_host_impl_->BeginMainFrameCompleted(); On 2016/07/19 01:08:59, enne wrote: > On 2016/07/18 ...
4 years, 5 months ago (2016-07-19 01:36:37 UTC) #36
danakj
PTAL Renamed the proxy methods to NotifyReadyToCommitOnImpl. The LTHI method to ReadyToCommit. The TestHooks to ...
4 years, 5 months ago (2016-07-19 22:52:01 UTC) #39
enne (OOO)
lgtm
4 years, 5 months ago (2016-07-19 22:54:31 UTC) #42
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/2158973002/180001
4 years, 5 months ago (2016-07-19 22:56:01 UTC) #45
danakj
I added ReadyToCommitOnThread to the LayerTreeHostTestFrameOrdering test also so we know it works for both ...
4 years, 5 months ago (2016-07-19 22:56:10 UTC) #46
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/2158973002/200001
4 years, 5 months ago (2016-07-19 22:57:45 UTC) #49
commit-bot: I haz the power
Committed patchset #10 (id:200001)
4 years, 5 months ago (2016-07-20 01:49:54 UTC) #51
commit-bot: I haz the power
4 years, 5 months ago (2016-07-20 01:51:14 UTC) #53
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/94b7e4fcc1fb51a468d3df292c622905c67405c5
Cr-Commit-Position: refs/heads/master@{#406450}

Powered by Google App Engine
This is Rietveld 408576698