Index: cc/trees/layer_tree_host.cc |
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
index 9d1c36657e1e410aec6c624f28fe77fef521040d..1b1616c35c0828ca2c6bced908baaad03e8fb792 100644 |
--- a/cc/trees/layer_tree_host.cc |
+++ b/cc/trees/layer_tree_host.cc |
@@ -367,6 +367,7 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) { |
} |
void LayerTreeHost::WillCommit() { |
+ OnCommitForSwapPromises(); |
client_->WillCommit(); |
} |
@@ -1270,6 +1271,11 @@ void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
swap_promise_list_.clear(); |
} |
+void LayerTreeHost::OnCommitForSwapPromises() { |
+ for (auto* swap_promise : swap_promise_list_) |
+ swap_promise->OnCommit(); |
+} |
+ |
void LayerTreeHost::set_surface_id_namespace(uint32_t id_namespace) { |
surface_id_namespace_ = id_namespace; |
} |