| 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); |
| 700 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); | 702 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); |
| 701 | 703 |
| 704 SetLayerTreeHostClientReady(); |
| 705 |
| 702 if (output_surface_lost_) | 706 if (output_surface_lost_) |
| 703 proxy->CreateAndInitializeOutputSurface(); | 707 proxy->CreateAndInitializeOutputSurface(); |
| 704 if (output_surface_lost_) | 708 if (output_surface_lost_) |
| 705 return; | 709 return; |
| 706 | 710 |
| 707 proxy->CompositeImmediately(frame_begin_time); | 711 proxy->CompositeImmediately(frame_begin_time); |
| 708 } | 712 } |
| 709 | 713 |
| 710 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { | 714 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { |
| 711 DCHECK(!output_surface_lost_); | 715 DCHECK(!output_surface_lost_); |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1285 swap_promise_list_.push_back(swap_promise.Pass()); | 1289 swap_promise_list_.push_back(swap_promise.Pass()); |
| 1286 } | 1290 } |
| 1287 | 1291 |
| 1288 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1292 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
| 1289 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1293 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
| 1290 swap_promise_list_[i]->DidNotSwap(reason); | 1294 swap_promise_list_[i]->DidNotSwap(reason); |
| 1291 swap_promise_list_.clear(); | 1295 swap_promise_list_.clear(); |
| 1292 } | 1296 } |
| 1293 | 1297 |
| 1294 } // namespace cc | 1298 } // namespace cc |
| OLD | NEW |