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

Issue 1126963006: Move VISUAL_STATE promise to activation (Closed)

Created:
5 years, 7 months ago by Tobias Sargeant
Modified:
5 years, 7 months ago
Reviewers:
boliu, piman
CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, jam, piman+watch_chromium.org, mlamouri+watch-content_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move VISUAL_STATE promise to activation Motivation is for android webview where compositor swaps is not controlled by chromium code, but activations are. Add a DidActivate to SwapPromise. This is an additional call before DidSwap. It is not meant to be the end of a SwapPromise as either DidSwap or DidNotSwap can still be called afterwards. Then modify the message queue to mark VISUAL_STATE messages as ready to deliver in DidActivate. On chrome, the messages are still delivered in swap, so there is no additional IPCs. In webview, they can be delivered in the activation callback. BUG=431166 Committed: https://crrev.com/93d4648413ae2c80388e667dc37257308fa9e889 Cr-Commit-Position: refs/heads/master@{#330128}

Patch Set 1 #

Patch Set 2 : Current state (presubmit warnings, cc_unittests tests failing) #

Total comments: 1

Patch Set 3 : Fix test failures #

Patch Set 4 : fix remaining compile errors and presubmit warnings. #

Patch Set 5 : fix BUILD.gn and unittests #

Patch Set 6 : #

Patch Set 7 : rebase #

Patch Set 8 : simplify and rename back to SwapPromise #

Patch Set 9 : revert rename of FrameSwapMessageQueue #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : update unittests #

Patch Set 14 : Update documentation #

Total comments: 4

Patch Set 15 : doc tweaks #

Total comments: 4

Patch Set 16 : improve tests and address comments #

Total comments: 9

Patch Set 17 : improve existing tests #

Total comments: 4

Patch Set 18 : address test comments #

Total comments: 2

Patch Set 19 : amend comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+202 lines, -104 lines) Patch
M cc/layers/surface_layer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M cc/output/latency_info_swap_promise.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M cc/output/latency_info_swap_promise.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M cc/output/swap_promise.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +24 lines, -11 lines 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 11 chunks +72 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +13 lines, -10 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
D content/renderer/gpu/frame_swap_message_queue.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +9 lines, -4 lines 0 comments Download
D content/renderer/gpu/frame_swap_message_queue.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +11 lines, -10 lines 0 comments Download
D content/renderer/gpu/frame_swap_message_queue_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +28 lines, -23 lines 0 comments Download
M content/renderer/gpu/queue_message_swap_promise.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +1 line, -2 lines 0 comments Download
M content/renderer/gpu/queue_message_swap_promise.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +8 lines, -0 lines 0 comments Download
M content/renderer/gpu/queue_message_swap_promise_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +30 lines, -39 lines 0 comments Download

Messages

Total messages: 21 (4 generated)
boliu
How about just Promises and don't distinguish between swap vs activation. So each promise will ...
5 years, 7 months ago (2015-05-08 04:27:24 UTC) #2
boliu
Need *new* cc_unittests, check after activate but before swap that DidActivate is called but DidSwap ...
5 years, 7 months ago (2015-05-13 16:07:47 UTC) #3
boliu
piman: ptal Still need to add new cc tests, but the rest of the change ...
5 years, 7 months ago (2015-05-13 21:26:01 UTC) #5
piman
A few things but otherwise LGTM once Bo is happy. https://codereview.chromium.org/1126963006/diff/280001/cc/trees/layer_tree_impl.cc File cc/trees/layer_tree_impl.cc (right): https://codereview.chromium.org/1126963006/diff/280001/cc/trees/layer_tree_impl.cc#newcode1080 ...
5 years, 7 months ago (2015-05-13 22:47:15 UTC) #6
Tobias Sargeant
https://codereview.chromium.org/1126963006/diff/260001/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/1126963006/diff/260001/cc/trees/layer_tree_host_unittest.cc#newcode4956 cc/trees/layer_tree_host_unittest.cc:4956: EXPECT_FALSE(result_->did_not_swap_called); On 2015/05/13 16:07:46, boliu wrote: > EXPECT_FALSE(did_activate_called) as ...
5 years, 7 months ago (2015-05-14 11:31:59 UTC) #7
boliu
I can think of two more cc_unittests to add. I think they aren't there * ...
5 years, 7 months ago (2015-05-14 14:40:22 UTC) #8
boliu
Oh, one more test. Check DidActivate already happened in tree_activation_callback_, since that's webview is delivering ...
5 years, 7 months ago (2015-05-14 16:30:17 UTC) #9
Tobias Sargeant
On 2015/05/14 16:30:17, boliu wrote: > Oh, one more test. Check DidActivate already happened in ...
5 years, 7 months ago (2015-05-14 21:40:28 UTC) #10
Tobias Sargeant
https://codereview.chromium.org/1126963006/diff/300001/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/1126963006/diff/300001/cc/trees/layer_tree_host_unittest.cc#newcode4974 cc/trees/layer_tree_host_unittest.cc:4974: EXPECT_TRUE(implies(reason == DidNotSwapReason::ACTIVATION_FAILS, On 2015/05/14 14:40:21, boliu wrote: > ...
5 years, 7 months ago (2015-05-14 21:40:48 UTC) #11
Tobias Sargeant
On 2015/05/14 14:40:22, boliu wrote: > I can think of two more cc_unittests to add. ...
5 years, 7 months ago (2015-05-14 21:43:33 UTC) #12
boliu
https://codereview.chromium.org/1126963006/diff/300001/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/1126963006/diff/300001/cc/trees/layer_tree_host_unittest.cc#newcode5010 cc/trees/layer_tree_host_unittest.cc:5010: if (host_impl->pending_tree()) { On 2015/05/14 21:40:48, Tobias Sargeant wrote: ...
5 years, 7 months ago (2015-05-15 03:50:50 UTC) #13
Tobias Sargeant
https://codereview.chromium.org/1126963006/diff/320001/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/1126963006/diff/320001/cc/trees/layer_tree_host_unittest.cc#newcode4974 cc/trees/layer_tree_host_unittest.cc:4974: reason == DidNotSwapReason::ACTIVATION_FAILS); On 2015/05/15 03:50:50, boliu wrote: > ...
5 years, 7 months ago (2015-05-15 16:30:49 UTC) #14
boliu
lgtm % last comment https://codereview.chromium.org/1126963006/diff/340001/content/renderer/gpu/frame_swap_message_queue.h File content/renderer/gpu/frame_swap_message_queue.h (right): https://codereview.chromium.org/1126963006/diff/340001/content/renderer/gpu/frame_swap_message_queue.h#newcode61 content/renderer/gpu/frame_swap_message_queue.h:61: // activation can be obtained ...
5 years, 7 months ago (2015-05-15 16:43:07 UTC) #15
Tobias Sargeant
https://codereview.chromium.org/1126963006/diff/340001/content/renderer/gpu/frame_swap_message_queue.h File content/renderer/gpu/frame_swap_message_queue.h (right): https://codereview.chromium.org/1126963006/diff/340001/content/renderer/gpu/frame_swap_message_queue.h#newcode61 content/renderer/gpu/frame_swap_message_queue.h:61: // activation can be obtained by calling DrainMessages. On ...
5 years, 7 months ago (2015-05-15 17:05:08 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1126963006/360001
5 years, 7 months ago (2015-05-15 17:05:30 UTC) #19
commit-bot: I haz the power
Committed patchset #19 (id:360001)
5 years, 7 months ago (2015-05-15 17:53:02 UTC) #20
commit-bot: I haz the power
5 years, 7 months ago (2015-05-15 17:54:29 UTC) #21
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/93d4648413ae2c80388e667dc37257308fa9e889
Cr-Commit-Position: refs/heads/master@{#330128}

Powered by Google App Engine
This is Rietveld 408576698