Index: cc/trees/remote_channel_main.cc |
diff --git a/cc/trees/remote_channel_main.cc b/cc/trees/remote_channel_main.cc |
index a231bcbe061dde24317cbce8969b914dde928e2f..70da4f3faba81ea81e9d7be6c44343d1d148b741 100644 |
--- a/cc/trees/remote_channel_main.cc |
+++ b/cc/trees/remote_channel_main.cc |
@@ -177,13 +177,18 @@ void RemoteChannelMain::StartCommitOnImpl( |
to_impl_proto->set_message_type(proto::CompositorMessageToImpl::START_COMMIT); |
proto::StartCommit* start_commit_message = |
to_impl_proto->mutable_start_commit_message(); |
+ std::vector<std::unique_ptr<SwapPromise>> swap_promises; |
layer_tree_host->ToProtobufForCommit( |
- start_commit_message->mutable_layer_tree_host()); |
+ start_commit_message->mutable_layer_tree_host(), &swap_promises); |
VLOG(1) << "Sending commit message to client. Commit bytes size: " |
<< proto.ByteSize(); |
SendMessageProto(proto); |
+ // Activate the swap promises after the commit is queued. |
vmpstr
2016/05/18 18:05:59
Can you expand the comment to explain why this is
Khushal
2016/05/18 21:16:58
Sure, Done.
|
+ for (const auto& swap_promise : swap_promises) |
+ swap_promise->DidActivate(); |
+ |
// In order to avoid incurring the overhead for the client to send us a |
// message for when a frame to be committed is drawn we inform the embedder |
// that the draw was successful immediately after sending the commit message. |