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

Issue 2188093002: cc: Complete swap promise for aborted commit after pending activation. (Closed)

Created:
4 years, 4 months ago by sunnyps
Modified:
4 years, 4 months ago
CC:
cc-bugs_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Complete swap promise for aborted commit after pending activation. Swap promises are used by android webview (via the visual state message in FrameSwapMessageQueue) to wait until all changes made on the main thread are ready to be drawn. This happens in two ways either we go through the commit and activate it or if there is aborted commit because there are no updates in the commit. In either case we assume that the compositor is ready to draw all changes. With main frame before activation we have two frames in flight where one frame is being activated and the next one is sent to the main thread. In case of aborted commits the swap promise for a frame might be completed before the previous frame is activated. This means that the assumption above re: being ready to draw is invalid. This CL allows passing swap promises from the main thread to the impl thread on aborted commits. If activation is pending on the impl thread the swap promises are queued up to be completed upon activation, otherwise the promises are completed immediately. For SingleThreadProxy and RemoteChannel we don't have multiple frames in flight so we complete the promises on the main thread as before. BUG=612596 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/ad3235e21ef666ea29cea5a8f85c303589880297 Cr-Commit-Position: refs/heads/master@{#410576}

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : fix compile error #

Total comments: 6

Patch Set 4 : rebase #

Patch Set 5 : test #

Patch Set 6 : brianderson's review #

Patch Set 7 : rebase #

Patch Set 8 : post rebase fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+294 lines, -183 lines) Patch
M cc/test/layer_tree_test.cc View 1 2 3 4 5 6 7 chunks +23 lines, -28 lines 0 comments Download
M cc/trees/channel_main.h View 1 chunk +2 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 3 4 5 6 2 chunks +7 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 2 chunks +7 lines, -13 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 20 chunks +53 lines, -70 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 16 chunks +136 lines, -38 lines 0 comments Download
M cc/trees/layer_tree_impl.h View 1 2 3 4 5 1 chunk +5 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 3 chunks +11 lines, -3 lines 0 comments Download
M cc/trees/proxy_impl.h View 1 chunk +4 lines, -2 lines 0 comments Download
M cc/trees/proxy_impl.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M cc/trees/proxy_main.cc View 1 2 4 chunks +9 lines, -5 lines 0 comments Download
M cc/trees/remote_channel_impl.cc View 1 chunk +3 lines, -1 line 0 comments Download
M cc/trees/remote_channel_main.h View 1 chunk +2 lines, -1 line 0 comments Download
M cc/trees/remote_channel_main.cc View 2 chunks +8 lines, -1 line 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 3 4 5 7 chunks +12 lines, -9 lines 0 comments Download
M cc/trees/threaded_channel.h View 1 chunk +2 lines, -1 line 0 comments Download
M cc/trees/threaded_channel.cc View 3 chunks +5 lines, -4 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 39 (24 generated)
sunnyps
PTAL This allows the android webview visual state tests to pass - running for a ...
4 years, 4 months ago (2016-07-28 02:06:07 UTC) #10
brianderson
lgtm w/ nits. https://codereview.chromium.org/2188093002/diff/40001/cc/trees/layer_tree_impl.cc File cc/trees/layer_tree_impl.cc (right): https://codereview.chromium.org/2188093002/diff/40001/cc/trees/layer_tree_impl.cc#newcode1498 cc/trees/layer_tree_impl.cc:1498: new_swap_promises.clear(); Is this call to clear ...
4 years, 4 months ago (2016-07-28 18:10:53 UTC) #17
enne (OOO)
Can you add unit tests? We have plenty of other swap promise-related unit tests, so ...
4 years, 4 months ago (2016-07-28 18:18:03 UTC) #18
boliu
Two high level things to point out (assuming I read the code correctly..) DidNotSwap(SwapPromise::COMMIT_NO_UPDATE) moved ...
4 years, 4 months ago (2016-07-28 18:38:42 UTC) #19
sunnyps
On 2016/07/28 18:38:42, boliu wrote: > Two high level things to point out (assuming I ...
4 years, 4 months ago (2016-07-28 21:25:02 UTC) #20
boliu
On 2016/07/28 21:25:02, sunnyps wrote: > On 2016/07/28 18:38:42, boliu wrote: > > Two high ...
4 years, 4 months ago (2016-07-28 21:29:06 UTC) #21
sunnyps
Added a test. PTAL boliu@ I believe I addressed your concerns when we discussed this. ...
4 years, 4 months ago (2016-08-02 02:55:09 UTC) #22
enne (OOO)
lgtm
4 years, 4 months ago (2016-08-04 17:41:10 UTC) #23
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/2188093002/100001
4 years, 4 months ago (2016-08-05 20:54:50 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/47358) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 4 months ago (2016-08-05 20:57:02 UTC) #28
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/2188093002/120001
4 years, 4 months ago (2016-08-09 01:58:47 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/108911) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 4 months ago (2016-08-09 02:09:22 UTC) #33
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/2188093002/140001
4 years, 4 months ago (2016-08-09 03:20:39 UTC) #36
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 4 months ago (2016-08-09 04:58:09 UTC) #37
commit-bot: I haz the power
4 years, 4 months ago (2016-08-09 05:00:06 UTC) #39
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/ad3235e21ef666ea29cea5a8f85c303589880297
Cr-Commit-Position: refs/heads/master@{#410576}

Powered by Google App Engine
This is Rietveld 408576698