Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Side by Side Diff: cc/trees/layer_tree_host.cc

Issue 548153004: Unified BeginFrame scheduling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 return host_impl.Pass(); 432 return host_impl.Pass();
433 } 433 }
434 434
435 void LayerTreeHost::DidLoseOutputSurface() { 435 void LayerTreeHost::DidLoseOutputSurface() {
436 TRACE_EVENT0("cc", "LayerTreeHost::DidLoseOutputSurface"); 436 TRACE_EVENT0("cc", "LayerTreeHost::DidLoseOutputSurface");
437 DCHECK(proxy_->IsMainThread()); 437 DCHECK(proxy_->IsMainThread());
438 438
439 if (output_surface_lost_) 439 if (output_surface_lost_)
440 return; 440 return;
441 441
442 client_->DidLoseOutputSurface();
443
442 num_failed_recreate_attempts_ = 0; 444 num_failed_recreate_attempts_ = 0;
443 output_surface_lost_ = true; 445 output_surface_lost_ = true;
444 SetNeedsCommit(); 446 SetNeedsCommit();
445 } 447 }
446 448
447 void LayerTreeHost::FinishAllRendering() { 449 void LayerTreeHost::FinishAllRendering() {
448 proxy_->FinishAllRendering(); 450 proxy_->FinishAllRendering();
449 } 451 }
450 452
451 void LayerTreeHost::SetDeferCommits(bool defer_commits) { 453 void LayerTreeHost::SetDeferCommits(bool defer_commits) {
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 DCHECK(swap_promise); 1302 DCHECK(swap_promise);
1301 swap_promise_list_.push_back(swap_promise.Pass()); 1303 swap_promise_list_.push_back(swap_promise.Pass());
1302 } 1304 }
1303 1305
1304 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { 1306 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
1305 for (size_t i = 0; i < swap_promise_list_.size(); i++) 1307 for (size_t i = 0; i < swap_promise_list_.size(); i++)
1306 swap_promise_list_[i]->DidNotSwap(reason); 1308 swap_promise_list_[i]->DidNotSwap(reason);
1307 swap_promise_list_.clear(); 1309 swap_promise_list_.clear();
1308 } 1310 }
1309 1311
1312 void LayerTreeHost::SetAuthoritativeVSyncInterval(base::TimeDelta interval) {
1313 proxy_->SetAuthoritativeVSyncInterval(interval);
1314 }
1315
1316 void LayerTreeHost::SetChildrenNeedBeginFrames(bool need_begin_frame) {
1317 proxy_->SetChildrenNeedBeginFrames(need_begin_frame);
1318 }
1319
1320 void LayerTreeHost::SendBeginFrameToChildren(const BeginFrameArgs& args) {
1321 client_->SendBeginFrameToChildren(args);
1322 }
1323
1310 } // namespace cc 1324 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698