| Index: cc/trees/layer_tree_host_impl.cc
|
| diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
|
| index 6965594181cb0a4dd868f89b7894ae6e36d2fdfa..88a5f1e712d4d90952cfca6327dbdf10a04325d5 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -242,7 +242,8 @@ LayerTreeHostImpl::LayerTreeHostImpl(
|
| scroll_animating_latched_node_id_(ScrollTree::kInvalidNodeId),
|
| has_scrolled_by_wheel_(false),
|
| has_scrolled_by_touch_(false),
|
| - touchpad_and_wheel_scroll_latching_enabled_(false) {
|
| + touchpad_and_wheel_scroll_latching_enabled_(false),
|
| + impl_thread_phase_(ImplThreadPhase::IDLE) {
|
| DCHECK(mutator_host_);
|
| mutator_host_->SetMutatorHostClient(this);
|
|
|
| @@ -340,6 +341,11 @@ void LayerTreeHostImpl::BeginCommit() {
|
| void LayerTreeHostImpl::CommitComplete() {
|
| TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete");
|
|
|
| + // In high latency mode commit cannot finish within the same frame. We need to
|
| + // flush input here to make sure they got picked up by |PrepareTiles()|.
|
| + if (input_handler_client_ && impl_thread_phase_ == ImplThreadPhase::IDLE)
|
| + input_handler_client_->DeliverInputForBeginFrame();
|
| +
|
| UpdateSyncTreeAfterCommitOrImplSideInvalidation();
|
| micro_benchmark_controller_.DidCompleteCommit();
|
| }
|
| @@ -1910,9 +1916,12 @@ void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) {
|
|
|
| for (auto* it : video_frame_controllers_)
|
| it->OnBeginFrame(args);
|
| +
|
| + impl_thread_phase_ = ImplThreadPhase::INSIDE_IMPL_FRAME;
|
| }
|
|
|
| void LayerTreeHostImpl::DidFinishImplFrame() {
|
| + impl_thread_phase_ = ImplThreadPhase::IDLE;
|
| current_begin_frame_tracker_.Finish();
|
| decoded_image_tracker_.NotifyFrameFinished();
|
| }
|
|
|