| 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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 | 675 |
| 676 SetNeedsCommit(); | 676 SetNeedsCommit(); |
| 677 } | 677 } |
| 678 | 678 |
| 679 void LayerTreeHost::NotifyInputThrottledUntilCommit() { | 679 void LayerTreeHost::NotifyInputThrottledUntilCommit() { |
| 680 proxy_->NotifyInputThrottledUntilCommit(); | 680 proxy_->NotifyInputThrottledUntilCommit(); |
| 681 } | 681 } |
| 682 | 682 |
| 683 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { | 683 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { |
| 684 DCHECK(!proxy_->HasImplThread()); | 684 DCHECK(!proxy_->HasImplThread()); |
| 685 // This function is only valid when not using the scheduler. |
| 686 DCHECK(!settings_.single_thread_proxy_scheduler); |
| 685 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); | 687 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); |
| 686 | 688 |
| 689 SetLayerTreeHostClientReady(); |
| 690 |
| 687 if (output_surface_lost_) | 691 if (output_surface_lost_) |
| 688 proxy->CreateAndInitializeOutputSurface(); | 692 proxy->CreateAndInitializeOutputSurface(); |
| 689 if (output_surface_lost_) | 693 if (output_surface_lost_) |
| 690 return; | 694 return; |
| 691 | 695 |
| 692 proxy->CompositeImmediately(frame_begin_time); | 696 proxy->CompositeImmediately(frame_begin_time); |
| 693 } | 697 } |
| 694 | 698 |
| 699 void LayerTreeHost::CompositeNoSwap(base::TimeTicks frame_begin_time) { |
| 700 DCHECK(!proxy_->HasImplThread()); |
| 701 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); |
| 702 proxy->CompositeImmediatelyNoSwap(frame_begin_time); |
| 703 } |
| 704 |
| 695 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { | 705 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { |
| 696 DCHECK(!output_surface_lost_); | 706 DCHECK(!output_surface_lost_); |
| 697 | 707 |
| 698 if (!root_layer()) | 708 if (!root_layer()) |
| 699 return false; | 709 return false; |
| 700 | 710 |
| 701 DCHECK(!root_layer()->parent()); | 711 DCHECK(!root_layer()->parent()); |
| 702 | 712 |
| 703 bool result = UpdateLayers(root_layer(), queue); | 713 bool result = UpdateLayers(root_layer(), queue); |
| 704 | 714 |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1272 swap_promise_list_.push_back(swap_promise.Pass()); | 1282 swap_promise_list_.push_back(swap_promise.Pass()); |
| 1273 } | 1283 } |
| 1274 | 1284 |
| 1275 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1285 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
| 1276 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1286 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
| 1277 swap_promise_list_[i]->DidNotSwap(reason); | 1287 swap_promise_list_[i]->DidNotSwap(reason); |
| 1278 swap_promise_list_.clear(); | 1288 swap_promise_list_.clear(); |
| 1279 } | 1289 } |
| 1280 | 1290 |
| 1281 } // namespace cc | 1291 } // namespace cc |
| OLD | NEW |