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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 return host_impl.Pass(); | 438 return host_impl.Pass(); |
439 } | 439 } |
440 | 440 |
441 void LayerTreeHost::DidLoseOutputSurface() { | 441 void LayerTreeHost::DidLoseOutputSurface() { |
442 TRACE_EVENT0("cc", "LayerTreeHost::DidLoseOutputSurface"); | 442 TRACE_EVENT0("cc", "LayerTreeHost::DidLoseOutputSurface"); |
443 DCHECK(proxy_->IsMainThread()); | 443 DCHECK(proxy_->IsMainThread()); |
444 | 444 |
445 if (output_surface_lost_) | 445 if (output_surface_lost_) |
446 return; | 446 return; |
447 | 447 |
| 448 client_->DidLoseOutputSurface(); |
| 449 |
448 num_failed_recreate_attempts_ = 0; | 450 num_failed_recreate_attempts_ = 0; |
449 output_surface_lost_ = true; | 451 output_surface_lost_ = true; |
450 SetNeedsCommit(); | 452 SetNeedsCommit(); |
451 } | 453 } |
452 | 454 |
453 void LayerTreeHost::FinishAllRendering() { | 455 void LayerTreeHost::FinishAllRendering() { |
454 proxy_->FinishAllRendering(); | 456 proxy_->FinishAllRendering(); |
455 } | 457 } |
456 | 458 |
457 void LayerTreeHost::SetDeferCommits(bool defer_commits) { | 459 void LayerTreeHost::SetDeferCommits(bool defer_commits) { |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1316 DCHECK(swap_promise); | 1318 DCHECK(swap_promise); |
1317 swap_promise_list_.push_back(swap_promise.Pass()); | 1319 swap_promise_list_.push_back(swap_promise.Pass()); |
1318 } | 1320 } |
1319 | 1321 |
1320 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1322 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
1321 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1323 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
1322 swap_promise_list_[i]->DidNotSwap(reason); | 1324 swap_promise_list_[i]->DidNotSwap(reason); |
1323 swap_promise_list_.clear(); | 1325 swap_promise_list_.clear(); |
1324 } | 1326 } |
1325 | 1327 |
| 1328 void LayerTreeHost::SetAuthoritativeVSyncInterval(base::TimeDelta interval) { |
| 1329 proxy_->SetAuthoritativeVSyncInterval(interval); |
| 1330 } |
| 1331 |
| 1332 void LayerTreeHost::SetChildrenNeedBeginFrames(bool need_begin_frame) { |
| 1333 proxy_->SetChildrenNeedBeginFrames(need_begin_frame); |
| 1334 } |
| 1335 |
| 1336 void LayerTreeHost::SendBeginFrameToChildren(const BeginFrameArgs& args) { |
| 1337 client_->SendBeginFrameToChildren(args); |
| 1338 } |
| 1339 |
1326 } // namespace cc | 1340 } // namespace cc |
OLD | NEW |