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

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

Issue 134623005: Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add scoped_abort_remaining_swap_promises.h Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host_perftest.cc » ('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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 692
693 SetNeedsCommit(); 693 SetNeedsCommit();
694 } 694 }
695 695
696 void LayerTreeHost::NotifyInputThrottledUntilCommit() { 696 void LayerTreeHost::NotifyInputThrottledUntilCommit() {
697 proxy_->NotifyInputThrottledUntilCommit(); 697 proxy_->NotifyInputThrottledUntilCommit();
698 } 698 }
699 699
700 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { 700 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) {
701 DCHECK(!proxy_->HasImplThread()); 701 DCHECK(!proxy_->HasImplThread());
702 // This function is only valid when not using the scheduler.
703 DCHECK(!settings_.single_thread_proxy_scheduler);
702 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); 704 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get());
703 705
706 SetLayerTreeHostClientReady();
707
704 if (output_surface_lost_) 708 if (output_surface_lost_)
705 proxy->CreateAndInitializeOutputSurface(); 709 proxy->CreateAndInitializeOutputSurface();
706 if (output_surface_lost_) 710 if (output_surface_lost_)
707 return; 711 return;
708 712
709 proxy->CompositeImmediately(frame_begin_time); 713 proxy->CompositeImmediately(frame_begin_time);
710 } 714 }
711 715
712 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { 716 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) {
713 DCHECK(!output_surface_lost_); 717 DCHECK(!output_surface_lost_);
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 swap_promise_list_.push_back(swap_promise.Pass()); 1300 swap_promise_list_.push_back(swap_promise.Pass());
1297 } 1301 }
1298 1302
1299 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { 1303 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
1300 for (size_t i = 0; i < swap_promise_list_.size(); i++) 1304 for (size_t i = 0; i < swap_promise_list_.size(); i++)
1301 swap_promise_list_[i]->DidNotSwap(reason); 1305 swap_promise_list_[i]->DidNotSwap(reason);
1302 swap_promise_list_.clear(); 1306 swap_promise_list_.clear();
1303 } 1307 }
1304 1308
1305 } // namespace cc 1309 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698