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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 | 668 |
669 SetNeedsCommit(); | 669 SetNeedsCommit(); |
670 } | 670 } |
671 | 671 |
672 void LayerTreeHost::NotifyInputThrottledUntilCommit() { | 672 void LayerTreeHost::NotifyInputThrottledUntilCommit() { |
673 proxy_->NotifyInputThrottledUntilCommit(); | 673 proxy_->NotifyInputThrottledUntilCommit(); |
674 } | 674 } |
675 | 675 |
676 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { | 676 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { |
677 DCHECK(!proxy_->HasImplThread()); | 677 DCHECK(!proxy_->HasImplThread()); |
| 678 // This function is only valid when not using the scheduler. |
| 679 DCHECK(!settings_.single_thread_proxy_scheduler); |
678 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); | 680 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); |
679 | 681 |
| 682 SetLayerTreeHostClientReady(); |
| 683 |
680 if (output_surface_lost_) | 684 if (output_surface_lost_) |
681 proxy->CreateAndInitializeOutputSurface(); | 685 proxy->CreateAndInitializeOutputSurface(); |
682 if (output_surface_lost_) | 686 if (output_surface_lost_) |
683 return; | 687 return; |
684 | 688 |
685 proxy->CompositeImmediately(frame_begin_time); | 689 proxy->CompositeImmediately(frame_begin_time); |
686 } | 690 } |
687 | 691 |
688 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { | 692 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { |
689 DCHECK(!output_surface_lost_); | 693 DCHECK(!output_surface_lost_); |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 swap_promise_list_.push_back(swap_promise.Pass()); | 1259 swap_promise_list_.push_back(swap_promise.Pass()); |
1256 } | 1260 } |
1257 | 1261 |
1258 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1262 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
1259 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1263 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
1260 swap_promise_list_[i]->DidNotSwap(reason); | 1264 swap_promise_list_[i]->DidNotSwap(reason); |
1261 swap_promise_list_.clear(); | 1265 swap_promise_list_.clear(); |
1262 } | 1266 } |
1263 | 1267 |
1264 } // namespace cc | 1268 } // namespace cc |
OLD | NEW |