Chromium Code Reviews| 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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 706 } | 706 } |
| 707 | 707 |
| 708 void LayerTreeHost::NotifyInputThrottledUntilCommit() { | 708 void LayerTreeHost::NotifyInputThrottledUntilCommit() { |
| 709 proxy_->NotifyInputThrottledUntilCommit(); | 709 proxy_->NotifyInputThrottledUntilCommit(); |
| 710 } | 710 } |
| 711 | 711 |
| 712 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { | 712 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { |
| 713 DCHECK(!proxy_->HasImplThread()); | 713 DCHECK(!proxy_->HasImplThread()); |
| 714 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); | 714 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); |
| 715 | 715 |
| 716 SetLayerTreeHostClientReady(); | |
|
simonhong
2014/06/13 11:55:12
Is there a case that Composite() is called before
enne (OOO)
2014/06/13 18:06:37
Yes, this happens quite a bit in tests. An altern
| |
| 717 | |
| 716 if (output_surface_lost_) | 718 if (output_surface_lost_) |
| 717 proxy->CreateAndInitializeOutputSurface(); | 719 proxy->CreateAndInitializeOutputSurface(); |
| 718 if (output_surface_lost_) | 720 if (output_surface_lost_) |
| 719 return; | 721 return; |
| 720 | 722 |
| 721 proxy->CompositeImmediately(frame_begin_time); | 723 proxy->CompositeImmediately(frame_begin_time); |
| 722 } | 724 } |
| 723 | 725 |
| 724 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { | 726 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { |
| 725 DCHECK(!output_surface_lost_); | 727 DCHECK(!output_surface_lost_); |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1291 swap_promise_list_.push_back(swap_promise.Pass()); | 1293 swap_promise_list_.push_back(swap_promise.Pass()); |
| 1292 } | 1294 } |
| 1293 | 1295 |
| 1294 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1296 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
| 1295 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1297 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
| 1296 swap_promise_list_[i]->DidNotSwap(reason); | 1298 swap_promise_list_[i]->DidNotSwap(reason); |
| 1297 swap_promise_list_.clear(); | 1299 swap_promise_list_.clear(); |
| 1298 } | 1300 } |
| 1299 | 1301 |
| 1300 } // namespace cc | 1302 } // namespace cc |
| OLD | NEW |