| 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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 pending_page_scale_animation_->duration = duration; | 704 pending_page_scale_animation_->duration = duration; |
| 705 | 705 |
| 706 SetNeedsCommit(); | 706 SetNeedsCommit(); |
| 707 } | 707 } |
| 708 | 708 |
| 709 void LayerTreeHost::NotifyInputThrottledUntilCommit() { | 709 void LayerTreeHost::NotifyInputThrottledUntilCommit() { |
| 710 proxy_->NotifyInputThrottledUntilCommit(); | 710 proxy_->NotifyInputThrottledUntilCommit(); |
| 711 } | 711 } |
| 712 | 712 |
| 713 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { | 713 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { |
| 714 if (!proxy_->HasImplThread()) | 714 if (!proxy_->HasImplThread()) { |
| 715 static_cast<SingleThreadProxy*>(proxy_.get())->CompositeImmediately( | 715 static_cast<SingleThreadProxy*>(proxy_.get()) |
| 716 frame_begin_time); | 716 ->CompositeImmediately(frame_begin_time); |
| 717 else | 717 } else { |
| 718 SetNeedsCommit(); | 718 SetNeedsCommit(); |
| 719 } |
| 719 } | 720 } |
| 720 | 721 |
| 721 bool LayerTreeHost::InitializeOutputSurfaceIfNeeded() { | 722 bool LayerTreeHost::InitializeOutputSurfaceIfNeeded() { |
| 722 if (!output_surface_can_be_initialized_) | 723 if (!output_surface_can_be_initialized_) |
| 723 return false; | 724 return false; |
| 724 | 725 |
| 725 if (output_surface_lost_) | 726 if (output_surface_lost_) |
| 726 proxy_->CreateAndInitializeOutputSurface(); | 727 proxy_->CreateAndInitializeOutputSurface(); |
| 727 return !output_surface_lost_; | 728 return !output_surface_lost_; |
| 728 } | 729 } |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 swap_promise_list_.push_back(swap_promise.Pass()); | 1313 swap_promise_list_.push_back(swap_promise.Pass()); |
| 1313 } | 1314 } |
| 1314 | 1315 |
| 1315 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1316 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
| 1316 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1317 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
| 1317 swap_promise_list_[i]->DidNotSwap(reason); | 1318 swap_promise_list_[i]->DidNotSwap(reason); |
| 1318 swap_promise_list_.clear(); | 1319 swap_promise_list_.clear(); |
| 1319 } | 1320 } |
| 1320 | 1321 |
| 1321 } // namespace cc | 1322 } // namespace cc |
| OLD | NEW |