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

Issue 2445093002: cc/blimp: Add synchronization for scroll/scale state. (Closed)

Created:
4 years, 1 month ago by Khushal
Modified:
4 years, 1 month ago
CC:
anandc+watch-blimp_chromium.org, bgoldman+watch-blimp_chromium.org, cc-bugs_chromium.org, chromium-reviews, dtrainor+watch-blimp_chromium.org, gcasto+watch-blimp_chromium.org, jessicag+watch-blimp_chromium.org, khushalsagar+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, lethalantidote+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, nyquist+watch-blimp_chromium.org, perumaal+watch-blimp_chromium.org, scf+watch-blimp_chromium.org, shaktisahu+watch-blimp_chromium.org, sriramsr+watch-blimp_chromium.org, steimel+watch-blimp_chromium.org, trchen
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc/blimp: Add synchronization for scroll/scale state. Add the protocol messages and the primitives to synchronize mutations to scroll and scale state on the engine and client. The protocol has been kept largely consistent with the message passing between the main and impl thread, as follows: 1) Both the engine and client can send an update to the other peer at any time, but must wait for an ack from the other peer before sending another update. 2) If the engine receives an update from the client, it must send the resulting frame with the acknowledgement for this update. This is consistent with the behaviour in the threaded compositor where the main thread always responds with a BeginMainFrameAborted or commit for deltas sent from the impl thread. However, as opposed to the threaded compositor, the communication between the engine and client is completely asynchronous. Enabling this requires state tracking on the client to track the deltas seen by the engine, when pushing the resulting frame update to the impl thread, so the impl thread can apply those deltas post-commit instead of expecting the main thread to reflect these values. The change adds a SyncedPropertyRemote primitive, which acts as the main thread equivalent of SyncedProperty, to perform this for all state that can be modified on the engine or client. BUG=648442 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/c48291b306dcaf99e5bf33451a30f9ac4fc7ab0f Cr-Commit-Position: refs/heads/master@{#429801}

Patch Set 1 #

Patch Set 2 : a lot of cleanup #

Patch Set 3 : minor fix #

Total comments: 8

Patch Set 4 : Addressed comments #

Total comments: 19

Patch Set 5 : Addressed aelias's comments #

Patch Set 6 : cc tests #

Patch Set 7 : move application of deltas to push time. #

Total comments: 23

Patch Set 8 : test update #

Patch Set 9 : missed a comment #

Total comments: 6

Patch Set 10 : vector2df #

Patch Set 11 : moar test updates. #

Patch Set 12 : Rebase on readback change. #

Patch Set 13 : fix rebase upload #

Total comments: 4

Patch Set 14 : fix document manager test #

Patch Set 15 : gn check #

Patch Set 16 : forgot include in test #

Patch Set 17 : test compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1431 lines, -435 lines) Patch
M blimp/client/core/compositor/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M blimp/client/core/compositor/blimp_compositor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 12 chunks +41 lines, -25 lines 0 comments Download
M blimp/client/core/compositor/blimp_compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 10 chunks +97 lines, -33 lines 0 comments Download
M blimp/client/core/compositor/blimp_compositor_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +81 lines, -52 lines 0 comments Download
M blimp/client/core/render_widget/blimp_document.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M blimp/client/core/render_widget/blimp_document_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +32 lines, -68 lines 0 comments Download
M blimp/client/test/compositor/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -0 lines 0 comments Download
A blimp/client/test/compositor/blimp_compositor_with_fake_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +50 lines, -0 lines 0 comments Download
A blimp/client/test/compositor/blimp_compositor_with_fake_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +60 lines, -0 lines 0 comments Download
M blimp/engine/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -0 lines 0 comments Download
M blimp/engine/app/settings_manager.cc View 1 chunk +1 line, -0 lines 0 comments Download
M blimp/engine/renderer/blimp_remote_compositor_bridge.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M blimp/engine/renderer/blimp_remote_compositor_bridge.cc View 1 2 3 4 5 6 7 3 chunks +36 lines, -3 lines 0 comments Download
A blimp/engine/renderer/blimp_remote_compositor_bridge_unittest.cc View 1 2 3 4 5 6 7 1 chunk +155 lines, -0 lines 0 comments Download
M blimp/engine/renderer/frame_scheduler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -5 lines 0 comments Download
M blimp/engine/renderer/frame_scheduler.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -7 lines 0 comments Download
M blimp/engine/renderer/frame_scheduler_unittest.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -13 lines 0 comments Download
M cc/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +2 lines, -1 line 0 comments Download
M cc/blimp/compositor_state_deserializer.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +55 lines, -13 lines 0 comments Download
M cc/blimp/compositor_state_deserializer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +129 lines, -15 lines 0 comments Download
D cc/blimp/compositor_state_deserializer_client.h View 1 chunk +0 lines, -34 lines 0 comments Download
M cc/blimp/compositor_state_deserializer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +80 lines, -33 lines 0 comments Download
M cc/blimp/layer_tree_host_remote.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -6 lines 0 comments Download
M cc/blimp/layer_tree_host_remote.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +37 lines, -30 lines 0 comments Download
M cc/blimp/layer_tree_host_remote_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +51 lines, -34 lines 0 comments Download
M cc/blimp/remote_compositor_bridge_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +7 lines, -7 lines 0 comments Download
A cc/blimp/synced_property_remote.h View 1 2 1 chunk +122 lines, -0 lines 0 comments Download
A cc/blimp/synced_property_remote_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +57 lines, -0 lines 0 comments Download
M cc/proto/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A + cc/proto/client_state_update.proto View 1 2 3 4 5 6 7 8 9 1 chunk +10 lines, -10 lines 0 comments Download
M cc/proto/compositor_message.proto View 1 2 chunks +14 lines, -0 lines 0 comments Download
M cc/test/layer_tree_host_remote_for_testing.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +4 lines, -9 lines 0 comments Download
M cc/test/layer_tree_host_remote_for_testing.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +22 lines, -30 lines 0 comments Download
M cc/trees/layer_tree.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -1 line 0 comments Download
M cc/trees/layer_tree.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host_common.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +15 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_common.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_in_process.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +17 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_in_process.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +26 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_unittest_scroll.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +187 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 66 (24 generated)
Khushal
This is super rough, I was trying to set everything up to make it work. ...
4 years, 1 month ago (2016-10-24 21:22:32 UTC) #3
Khushal
I think this is ready for a more formal review now. Still need to add ...
4 years, 1 month ago (2016-10-25 02:45:49 UTC) #6
danakj
Seems good I can't think of any obvious ways to do it differently. Have aelias ...
4 years, 1 month ago (2016-10-25 22:14:43 UTC) #8
Khushal
https://codereview.chromium.org/2445093002/diff/40001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/2445093002/diff/40001/cc/trees/layer_tree_host_impl.cc#newcode347 cc/trees/layer_tree_host_impl.cc:347: pending_tree()->ApplyReflectedMainFrameState(); On 2016/10/25 22:14:43, danakj wrote: > Shouldn't it ...
4 years, 1 month ago (2016-10-25 22:44:33 UTC) #9
danakj
https://codereview.chromium.org/2445093002/diff/40001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/2445093002/diff/40001/cc/trees/layer_tree_host_impl.cc#newcode347 cc/trees/layer_tree_host_impl.cc:347: pending_tree()->ApplyReflectedMainFrameState(); On 2016/10/25 22:44:33, Khushal wrote: > On 2016/10/25 ...
4 years, 1 month ago (2016-10-25 23:55:55 UTC) #10
Khushal
https://codereview.chromium.org/2445093002/diff/40001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/2445093002/diff/40001/cc/trees/layer_tree_host_impl.cc#newcode344 cc/trees/layer_tree_host_impl.cc:344: // If the state was committed to the pending ...
4 years, 1 month ago (2016-10-26 01:03:29 UTC) #11
David Trainor- moved to gerrit
lgtm % other reviewers.
4 years, 1 month ago (2016-10-26 01:40:11 UTC) #12
David Trainor- moved to gerrit
notlgtm sorry wrong CL!
4 years, 1 month ago (2016-10-26 01:40:23 UTC) #13
David Trainor- moved to gerrit
On 2016/10/26 01:40:23, David Trainor wrote: > notlgtm sorry wrong CL! not lgtm. Turn red ...
4 years, 1 month ago (2016-10-26 01:42:09 UTC) #14
aelias_OOO_until_Jul13
https://codereview.chromium.org/2445093002/diff/60001/blimp/client/core/compositor/blimp_compositor.cc File blimp/client/core/compositor/blimp_compositor.cc (right): https://codereview.chromium.org/2445093002/diff/60001/blimp/client/core/compositor/blimp_compositor.cc#newcode171 blimp/client/core/compositor/blimp_compositor.cc:171: // TODO(khushalsagar): Fix before landing, the code here assumes ...
4 years, 1 month ago (2016-10-26 04:04:12 UTC) #15
Khushal
https://codereview.chromium.org/2445093002/diff/60001/blimp/client/core/compositor/blimp_compositor.cc File blimp/client/core/compositor/blimp_compositor.cc (right): https://codereview.chromium.org/2445093002/diff/60001/blimp/client/core/compositor/blimp_compositor.cc#newcode171 blimp/client/core/compositor/blimp_compositor.cc:171: // TODO(khushalsagar): Fix before landing, the code here assumes ...
4 years, 1 month ago (2016-10-26 19:02:35 UTC) #16
aelias_OOO_until_Jul13
https://codereview.chromium.org/2445093002/diff/60001/blimp/client/core/compositor/blimp_compositor.cc File blimp/client/core/compositor/blimp_compositor.cc (right): https://codereview.chromium.org/2445093002/diff/60001/blimp/client/core/compositor/blimp_compositor.cc#newcode171 blimp/client/core/compositor/blimp_compositor.cc:171: // TODO(khushalsagar): Fix before landing, the code here assumes ...
4 years, 1 month ago (2016-10-27 02:09:55 UTC) #17
Khushal
https://codereview.chromium.org/2445093002/diff/60001/cc/base/synced_property.h File cc/base/synced_property.h (right): https://codereview.chromium.org/2445093002/diff/60001/cc/base/synced_property.h#newcode60 cc/base/synced_property.h:60: void AddUnappliedDeltaToPendingBase(typename T::ValueType unapplied_delta) { On 2016/10/27 02:09:55, aelias ...
4 years, 1 month ago (2016-10-27 04:26:26 UTC) #18
Khushal
https://codereview.chromium.org/2445093002/diff/60001/cc/base/synced_property.h File cc/base/synced_property.h (right): https://codereview.chromium.org/2445093002/diff/60001/cc/base/synced_property.h#newcode60 cc/base/synced_property.h:60: void AddUnappliedDeltaToPendingBase(typename T::ValueType unapplied_delta) { On 2016/10/27 04:26:26, Khushal ...
4 years, 1 month ago (2016-10-27 04:38:32 UTC) #19
aelias_OOO_until_Jul13
https://codereview.chromium.org/2445093002/diff/60001/cc/base/synced_property.h File cc/base/synced_property.h (right): https://codereview.chromium.org/2445093002/diff/60001/cc/base/synced_property.h#newcode60 cc/base/synced_property.h:60: void AddUnappliedDeltaToPendingBase(typename T::ValueType unapplied_delta) { How about registering a ...
4 years, 1 month ago (2016-10-27 07:01:31 UTC) #20
aelias_OOO_until_Jul13
I'm also looking into how to rebaseline the fixed-pos elements to perma-(0,0) which as I've ...
4 years, 1 month ago (2016-10-27 08:30:58 UTC) #21
Khushal
On 2016/10/27 08:30:58, aelias wrote: > I'm also looking into how to rebaseline the fixed-pos ...
4 years, 1 month ago (2016-10-28 01:37:34 UTC) #22
Khushal
4 years, 1 month ago (2016-10-28 01:37:52 UTC) #24
Khushal
Also, sorry the patch got rather large. This one also includes the tests.
4 years, 1 month ago (2016-10-28 01:38:34 UTC) #25
aelias_OOO_until_Jul13
OK, as discussed offline, I'm satisfied this general approach is the best we can do ...
4 years, 1 month ago (2016-10-28 03:40:20 UTC) #26
Khushal
https://codereview.chromium.org/2445093002/diff/120001/blimp/client/core/compositor/blimp_compositor.cc File blimp/client/core/compositor/blimp_compositor.cc (right): https://codereview.chromium.org/2445093002/diff/120001/blimp/client/core/compositor/blimp_compositor.cc#newcode171 blimp/client/core/compositor/blimp_compositor.cc:171: // TODO(khushalsagar): Fix before landing, the code here assumes ...
4 years, 1 month ago (2016-10-28 04:11:17 UTC) #27
Khushal
https://codereview.chromium.org/2445093002/diff/120001/blimp/client/core/compositor/blimp_compositor.cc File blimp/client/core/compositor/blimp_compositor.cc (right): https://codereview.chromium.org/2445093002/diff/120001/blimp/client/core/compositor/blimp_compositor.cc#newcode171 blimp/client/core/compositor/blimp_compositor.cc:171: // TODO(khushalsagar): Fix before landing, the code here assumes ...
4 years, 1 month ago (2016-10-28 07:43:56 UTC) #28
ajuma
On 2016/10/28 01:37:34, Khushal wrote: > On 2016/10/27 08:30:58, aelias wrote: > > I'm also ...
4 years, 1 month ago (2016-10-28 16:58:24 UTC) #29
Khushal
On 2016/10/28 16:58:24, ajuma wrote: > On 2016/10/28 01:37:34, Khushal wrote: > > On 2016/10/27 ...
4 years, 1 month ago (2016-10-28 21:52:41 UTC) #30
aelias_OOO_until_Jul13
https://codereview.chromium.org/2445093002/diff/120001/cc/blimp/compositor_state_deserializer_unittest.cc File cc/blimp/compositor_state_deserializer_unittest.cc (right): https://codereview.chromium.org/2445093002/diff/120001/cc/blimp/compositor_state_deserializer_unittest.cc#newcode394 cc/blimp/compositor_state_deserializer_unittest.cc:394: scroll_update.scroll_delta = gfx::Vector2d(delta.x(), delta.y()); On 2016/10/28 at 04:11:17, Khushal ...
4 years, 1 month ago (2016-10-29 02:35:53 UTC) #31
kuzminruslan
https://codereview.chromium.org/2445093002/diff/160001/blimp/client/core/compositor/blimp_compositor.h File blimp/client/core/compositor/blimp_compositor.h (right): https://codereview.chromium.org/2445093002/diff/160001/blimp/client/core/compositor/blimp_compositor.h#newcode113 blimp/client/core/compositor/blimp_compositor.h:113: perhaps forgotten private https://codereview.chromium.org/2445093002/diff/160001/cc/blimp/compositor_state_deserializer.h File cc/blimp/compositor_state_deserializer.h (right): https://codereview.chromium.org/2445093002/diff/160001/cc/blimp/compositor_state_deserializer.h#newcode47 cc/blimp/compositor_state_deserializer.h:47: ...
4 years, 1 month ago (2016-10-30 13:18:41 UTC) #33
Khushal
https://codereview.chromium.org/2445093002/diff/120001/cc/blimp/compositor_state_deserializer.cc File cc/blimp/compositor_state_deserializer.cc (right): https://codereview.chromium.org/2445093002/diff/120001/cc/blimp/compositor_state_deserializer.cc#newcode145 cc/blimp/compositor_state_deserializer.cc:145: gfx::Vector2d scroll_delta_vector(scroll_offset_delta.x(), On 2016/10/28 03:40:20, aelias wrote: > gfx::Vector2dF ...
4 years, 1 month ago (2016-10-31 21:02:01 UTC) #34
Khushal
https://codereview.chromium.org/2445093002/diff/160001/blimp/client/core/compositor/blimp_compositor.h File blimp/client/core/compositor/blimp_compositor.h (right): https://codereview.chromium.org/2445093002/diff/160001/blimp/client/core/compositor/blimp_compositor.h#newcode113 blimp/client/core/compositor/blimp_compositor.h:113: On 2016/10/30 13:18:40, kuzminruslan wrote: > perhaps forgotten private ...
4 years, 1 month ago (2016-10-31 23:00:27 UTC) #35
Khushal
friendly ping. :)
4 years, 1 month ago (2016-11-02 04:05:28 UTC) #40
aelias_OOO_until_Jul13
Sorry for the delay in review, I've been oversubscribed this week. lgtm for cc/ directory, ...
4 years, 1 month ago (2016-11-02 07:06:08 UTC) #41
Khushal
On 2016/11/02 07:06:08, aelias wrote: > Sorry for the delay in review, I've been oversubscribed ...
4 years, 1 month ago (2016-11-02 07:38:30 UTC) #42
David Trainor- moved to gerrit
lgtm. thanks khushal! https://codereview.chromium.org/2445093002/diff/240001/blimp/client/core/compositor/blimp_compositor.cc File blimp/client/core/compositor/blimp_compositor.cc (right): https://codereview.chromium.org/2445093002/diff/240001/blimp/client/core/compositor/blimp_compositor.cc#newcode492 blimp/client/core/compositor/blimp_compositor.cc:492: message.set_frame_ack(false); Should we just not set ...
4 years, 1 month ago (2016-11-03 05:34:59 UTC) #43
Khushal
Thanks David! https://codereview.chromium.org/2445093002/diff/240001/blimp/client/core/compositor/blimp_compositor.cc File blimp/client/core/compositor/blimp_compositor.cc (right): https://codereview.chromium.org/2445093002/diff/240001/blimp/client/core/compositor/blimp_compositor.cc#newcode492 blimp/client/core/compositor/blimp_compositor.cc:492: message.set_frame_ack(false); On 2016/11/03 05:34:59, David Trainor wrote: ...
4 years, 1 month ago (2016-11-03 06:17:28 UTC) #44
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/2445093002/260001
4 years, 1 month ago (2016-11-03 19:57:50 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/157584) android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, ...
4 years, 1 month ago (2016-11-03 20:03:51 UTC) #49
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/2445093002/280001
4 years, 1 month ago (2016-11-03 22:08:15 UTC) #52
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/158047) android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, ...
4 years, 1 month ago (2016-11-03 22:53:34 UTC) #54
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/2445093002/300001
4 years, 1 month ago (2016-11-04 01:47:36 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/61527) linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, ...
4 years, 1 month ago (2016-11-04 02:16:33 UTC) #59
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/2445093002/320001
4 years, 1 month ago (2016-11-04 02:34:41 UTC) #62
commit-bot: I haz the power
Committed patchset #17 (id:320001)
4 years, 1 month ago (2016-11-04 05:53:50 UTC) #64
commit-bot: I haz the power
4 years, 1 month ago (2016-11-04 05:56:40 UTC) #66
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/c48291b306dcaf99e5bf33451a30f9ac4fc7ab0f
Cr-Commit-Position: refs/heads/master@{#429801}

Powered by Google App Engine
This is Rietveld 408576698