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

Issue 2151433004: cc: Make LayerTreeHostImpl::SwapBuffers not virtual. (Closed)

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

Description

cc: Make LayerTreeHostImpl::SwapBuffers not virtual. This makes it no longer exposed to unit tests, which helps because Draw&Swap will be joining into a single action in LayerTreeHostImpl since it doesn't actually "draw" anything, it just IPCs things. Tests now have a SwapBuffersCompleteOnThread() instead, which is called asynchronously from anything LayerTreeHostImpl is doing, so I removed the LayerTreeHostImpl* passed to it, and changed tests to use DrawLayersOnThread() when they need to run things at the time of LayerTreeHostImpl doing things, and handle SwapBuffersCompleteOnThread() being asynchronous. This would be a bit simpler if there was no SwapBuffers after DrawLayersOnThread() happening at all, but I work with it in the tests anyhow. R=enne BUG=606056 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/9c14156250323f5f994239a4597022cdd6ba9020 Cr-Commit-Position: refs/heads/master@{#405362}

Patch Set 1 #

Patch Set 2 : novirtualswapbuffers: . #

Total comments: 8

Patch Set 3 : novirtualswapbuffers: self-nits #

Total comments: 2

Patch Set 4 : novirtualswapbuffers: num_draws_ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -137 lines) Patch
M cc/layers/surface_layer_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M cc/layers/texture_layer_unittest.cc View 1 2 3 chunks +0 lines, -37 lines 0 comments Download
M cc/output/delegating_renderer_unittest.cc View 4 chunks +7 lines, -6 lines 0 comments Download
M cc/output/output_surface_client.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M cc/test/fake_output_surface.h View 1 3 chunks +3 lines, -2 lines 0 comments Download
M cc/test/fake_output_surface.cc View 1 2 3 chunks +21 lines, -14 lines 0 comments Download
M cc/test/layer_tree_test.cc View 1 chunk +1 line, -7 lines 0 comments Download
M cc/test/test_hooks.h View 1 chunk +5 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 9 chunks +13 lines, -18 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_animation.cc View 1 chunk +11 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_unittest_copyrequest.cc View 6 chunks +14 lines, -13 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_damage.cc View 1 2 3 11 chunks +29 lines, -34 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 14 (6 generated)
danakj
https://codereview.chromium.org/2151433004/diff/20001/cc/layers/surface_layer_unittest.cc File cc/layers/surface_layer_unittest.cc (left): https://codereview.chromium.org/2151433004/diff/20001/cc/layers/surface_layer_unittest.cc#oldcode195 cc/layers/surface_layer_unittest.cc:195: EXPECT_TRUE(result); This function only happens now if swap happened, ...
4 years, 5 months ago (2016-07-13 21:50:18 UTC) #2
danakj
A few self-nits/cleanups after those comments.
4 years, 5 months ago (2016-07-13 21:50:42 UTC) #3
enne (OOO)
lgtm buuut https://codereview.chromium.org/2151433004/diff/40001/cc/trees/layer_tree_host_unittest_damage.cc File cc/trees/layer_tree_host_unittest_damage.cc (right): https://codereview.chromium.org/2151433004/diff/40001/cc/trees/layer_tree_host_unittest_damage.cc#newcode497 cc/trees/layer_tree_host_unittest_damage.cc:497: ++did_swaps_; did_swaps <_< I hate to nit ...
4 years, 5 months ago (2016-07-13 22:51:14 UTC) #6
danakj
https://codereview.chromium.org/2151433004/diff/40001/cc/trees/layer_tree_host_unittest_damage.cc File cc/trees/layer_tree_host_unittest_damage.cc (right): https://codereview.chromium.org/2151433004/diff/40001/cc/trees/layer_tree_host_unittest_damage.cc#newcode497 cc/trees/layer_tree_host_unittest_damage.cc:497: ++did_swaps_; On 2016/07/13 22:51:14, enne wrote: > did_swaps <_< ...
4 years, 5 months ago (2016-07-13 23:11:53 UTC) #7
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/2151433004/60001
4 years, 5 months ago (2016-07-13 23:12:43 UTC) #10
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 5 months ago (2016-07-14 00:29:03 UTC) #11
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-14 00:29:12 UTC) #12
commit-bot: I haz the power
4 years, 5 months ago (2016-07-14 00:31:22 UTC) #14
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/9c14156250323f5f994239a4597022cdd6ba9020
Cr-Commit-Position: refs/heads/master@{#405362}

Powered by Google App Engine
This is Rietveld 408576698