| 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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 pending_page_scale_animation_->duration = duration; | 689 pending_page_scale_animation_->duration = duration; |
| 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 if (!proxy_->HasImplThread()) | 699 DCHECK(!proxy_->HasImplThread()); |
| 700 static_cast<SingleThreadProxy*>(proxy_.get())->CompositeImmediately( | 700 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); |
| 701 frame_begin_time); | 701 proxy->CompositeImmediately(frame_begin_time); |
| 702 else | |
| 703 SetNeedsCommit(); | |
| 704 } | 702 } |
| 705 | 703 |
| 706 bool LayerTreeHost::InitializeOutputSurfaceIfNeeded() { | 704 bool LayerTreeHost::InitializeOutputSurfaceIfNeeded() { |
| 707 if (!output_surface_can_be_initialized_) | 705 if (!output_surface_can_be_initialized_) |
| 708 return false; | 706 return false; |
| 709 | 707 |
| 710 if (output_surface_lost_) | 708 if (output_surface_lost_) |
| 711 proxy_->CreateAndInitializeOutputSurface(); | 709 proxy_->CreateAndInitializeOutputSurface(); |
| 712 return !output_surface_lost_; | 710 return !output_surface_lost_; |
| 713 } | 711 } |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1252 swap_promise_list_.push_back(swap_promise.Pass()); | 1250 swap_promise_list_.push_back(swap_promise.Pass()); |
| 1253 } | 1251 } |
| 1254 | 1252 |
| 1255 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1253 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
| 1256 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1254 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
| 1257 swap_promise_list_[i]->DidNotSwap(reason); | 1255 swap_promise_list_[i]->DidNotSwap(reason); |
| 1258 swap_promise_list_.clear(); | 1256 swap_promise_list_.clear(); |
| 1259 } | 1257 } |
| 1260 | 1258 |
| 1261 } // namespace cc | 1259 } // namespace cc |
| OLD | NEW |