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

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: Rebase Created 6 years, 5 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
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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 675
676 SetNeedsCommit(); 676 SetNeedsCommit();
677 } 677 }
678 678
679 void LayerTreeHost::NotifyInputThrottledUntilCommit() { 679 void LayerTreeHost::NotifyInputThrottledUntilCommit() {
680 proxy_->NotifyInputThrottledUntilCommit(); 680 proxy_->NotifyInputThrottledUntilCommit();
681 } 681 }
682 682
683 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { 683 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) {
684 DCHECK(!proxy_->HasImplThread()); 684 DCHECK(!proxy_->HasImplThread());
685 // This function is only valid when not using the scheduler.
686 DCHECK(!settings_.single_thread_proxy_scheduler);
685 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); 687 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get());
686 688
689 SetLayerTreeHostClientReady();
690
687 if (output_surface_lost_) 691 if (output_surface_lost_)
688 proxy->CreateAndInitializeOutputSurface(); 692 proxy->CreateAndInitializeOutputSurface();
689 if (output_surface_lost_) 693 if (output_surface_lost_)
690 return; 694 return;
691 695
692 proxy->CompositeImmediately(frame_begin_time); 696 proxy->CompositeImmediately(frame_begin_time);
693 } 697 }
694 698
695 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { 699 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) {
696 DCHECK(!output_surface_lost_); 700 DCHECK(!output_surface_lost_);
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 swap_promise_list_.push_back(swap_promise.Pass()); 1276 swap_promise_list_.push_back(swap_promise.Pass());
1273 } 1277 }
1274 1278
1275 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { 1279 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
1276 for (size_t i = 0; i < swap_promise_list_.size(); i++) 1280 for (size_t i = 0; i < swap_promise_list_.size(); i++)
1277 swap_promise_list_[i]->DidNotSwap(reason); 1281 swap_promise_list_[i]->DidNotSwap(reason);
1278 swap_promise_list_.clear(); 1282 swap_promise_list_.clear();
1279 } 1283 }
1280 1284
1281 } // namespace cc 1285 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698