| 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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 | 690 |
| 691 SetNeedsCommit(); | 691 SetNeedsCommit(); |
| 692 } | 692 } |
| 693 | 693 |
| 694 void LayerTreeHost::NotifyInputThrottledUntilCommit() { | 694 void LayerTreeHost::NotifyInputThrottledUntilCommit() { |
| 695 proxy_->NotifyInputThrottledUntilCommit(); | 695 proxy_->NotifyInputThrottledUntilCommit(); |
| 696 } | 696 } |
| 697 | 697 |
| 698 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { | 698 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { |
| 699 DCHECK(!proxy_->HasImplThread()); | 699 DCHECK(!proxy_->HasImplThread()); |
| 700 // This function is only valid when not using the scheduler. | |
| 701 DCHECK(!settings_.single_thread_proxy_scheduler); | |
| 702 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); | 700 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); |
| 703 | 701 |
| 704 SetLayerTreeHostClientReady(); | |
| 705 | |
| 706 if (output_surface_lost_) | 702 if (output_surface_lost_) |
| 707 proxy->CreateAndInitializeOutputSurface(); | 703 proxy->CreateAndInitializeOutputSurface(); |
| 708 if (output_surface_lost_) | 704 if (output_surface_lost_) |
| 709 return; | 705 return; |
| 710 | 706 |
| 711 proxy->CompositeImmediately(frame_begin_time); | 707 proxy->CompositeImmediately(frame_begin_time); |
| 712 } | 708 } |
| 713 | 709 |
| 714 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { | 710 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { |
| 715 DCHECK(!output_surface_lost_); | 711 DCHECK(!output_surface_lost_); |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 swap_promise_list_.push_back(swap_promise.Pass()); | 1285 swap_promise_list_.push_back(swap_promise.Pass()); |
| 1290 } | 1286 } |
| 1291 | 1287 |
| 1292 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1288 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
| 1293 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1289 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
| 1294 swap_promise_list_[i]->DidNotSwap(reason); | 1290 swap_promise_list_[i]->DidNotSwap(reason); |
| 1295 swap_promise_list_.clear(); | 1291 swap_promise_list_.clear(); |
| 1296 } | 1292 } |
| 1297 | 1293 |
| 1298 } // namespace cc | 1294 } // namespace cc |
| OLD | NEW |