OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <stack> | 8 #include <stack> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 | 689 |
690 SetNeedsCommit(); | 690 SetNeedsCommit(); |
691 } | 691 } |
692 | 692 |
693 void LayerTreeHost::NotifyInputThrottledUntilCommit() { | 693 void LayerTreeHost::NotifyInputThrottledUntilCommit() { |
694 proxy_->NotifyInputThrottledUntilCommit(); | 694 proxy_->NotifyInputThrottledUntilCommit(); |
695 } | 695 } |
696 | 696 |
697 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { | 697 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { |
698 DCHECK(!proxy_->HasImplThread()); | 698 DCHECK(!proxy_->HasImplThread()); |
| 699 // This function is only valid when not using the scheduler. |
| 700 DCHECK(!settings_.single_thread_proxy_scheduler); |
699 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); | 701 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); |
700 | 702 |
| 703 SetLayerTreeHostClientReady(); |
| 704 |
701 if (output_surface_lost_) | 705 if (output_surface_lost_) |
702 proxy->CreateAndInitializeOutputSurface(); | 706 proxy->CreateAndInitializeOutputSurface(); |
703 if (output_surface_lost_) | 707 if (output_surface_lost_) |
704 return; | 708 return; |
705 | 709 |
706 proxy->CompositeImmediately(frame_begin_time); | 710 proxy->CompositeImmediately(frame_begin_time); |
707 } | 711 } |
708 | 712 |
709 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { | 713 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { |
710 DCHECK(!output_surface_lost_); | 714 DCHECK(!output_surface_lost_); |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 swap_promise_list_.push_back(swap_promise.Pass()); | 1288 swap_promise_list_.push_back(swap_promise.Pass()); |
1285 } | 1289 } |
1286 | 1290 |
1287 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1291 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
1288 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1292 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
1289 swap_promise_list_[i]->DidNotSwap(reason); | 1293 swap_promise_list_[i]->DidNotSwap(reason); |
1290 swap_promise_list_.clear(); | 1294 swap_promise_list_.clear(); |
1291 } | 1295 } |
1292 | 1296 |
1293 } // namespace cc | 1297 } // namespace cc |
OLD | NEW |