| Index: cc/trees/layer_tree_host.cc
|
| diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
|
| index f295efcfaca6ea2c8cdaf8b5fbe7946151a5bcca..9884ada54294cbf2e6f7631577a5b365b6b2c46d 100644
|
| --- a/cc/trees/layer_tree_host.cc
|
| +++ b/cc/trees/layer_tree_host.cc
|
| @@ -517,6 +517,11 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) {
|
|
|
| sync_tree->PassSwapPromises(&swap_promise_list_);
|
|
|
| + for (auto& swap_promise : forced_redraw_swap_promises_) {
|
| + host_impl->QueueForcedRedrawSwapPromise(std::move(swap_promise));
|
| + }
|
| + forced_redraw_swap_promises_.clear();
|
| +
|
| sync_tree->set_top_controls_shrink_blink_size(
|
| top_controls_shrink_blink_size_);
|
| sync_tree->set_top_controls_height(top_controls_height_);
|
| @@ -749,6 +754,7 @@ void LayerTreeHost::SetNextCommitWaitsForActivation() {
|
| void LayerTreeHost::SetNextCommitForcesRedraw() {
|
| next_commit_forces_redraw_ = true;
|
| proxy_->SetNeedsUpdateLayers();
|
| + NotifySwapPromiseMonitorsOfSetNeedsForcedRedraw();
|
| }
|
|
|
| void LayerTreeHost::SetAnimationEvents(
|
| @@ -1285,12 +1291,23 @@ void LayerTreeHost::NotifySwapPromiseMonitorsOfSetNeedsCommit() {
|
| (*it)->OnSetNeedsCommitOnMain();
|
| }
|
|
|
| +void LayerTreeHost::NotifySwapPromiseMonitorsOfSetNeedsForcedRedraw() {
|
| + std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
|
| + for (; it != swap_promise_monitor_.end(); it++)
|
| + (*it)->OnSetNeedsForcedRedrawOnMain();
|
| +}
|
| +
|
| void LayerTreeHost::QueueSwapPromise(
|
| std::unique_ptr<SwapPromise> swap_promise) {
|
| DCHECK(swap_promise);
|
| swap_promise_list_.push_back(std::move(swap_promise));
|
| }
|
|
|
| +void LayerTreeHost::QueueForcedRedrawSwapPromise(
|
| + std::unique_ptr<SwapPromise> swap_promise) {
|
| + forced_redraw_swap_promises_.push_back(std::move(swap_promise));
|
| +}
|
| +
|
| void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
|
| for (const auto& swap_promise : swap_promise_list_)
|
| swap_promise->DidNotSwap(reason);
|
|
|