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

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: Abort commits properly, handle swap promises, test those 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
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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 690
691 SetNeedsCommit(); 691 SetNeedsCommit();
692 } 692 }
693 693
694 void LayerTreeHost::NotifyInputThrottledUntilCommit() { 694 void LayerTreeHost::NotifyInputThrottledUntilCommit() {
695 proxy_->NotifyInputThrottledUntilCommit(); 695 proxy_->NotifyInputThrottledUntilCommit();
696 } 696 }
697 697
698 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { 698 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) {
699 DCHECK(!proxy_->HasImplThread()); 699 DCHECK(!proxy_->HasImplThread());
700 // This function is only valid when not using the scheduler.
701 DCHECK(!settings_.single_thread_proxy_scheduler);
700 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); 702 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get());
701 703
704 SetLayerTreeHostClientReady();
705
702 if (output_surface_lost_) 706 if (output_surface_lost_)
703 proxy->CreateAndInitializeOutputSurface(); 707 proxy->CreateAndInitializeOutputSurface();
704 if (output_surface_lost_) 708 if (output_surface_lost_)
705 return; 709 return;
706 710
707 proxy->CompositeImmediately(frame_begin_time); 711 proxy->CompositeImmediately(frame_begin_time);
708 } 712 }
709 713
710 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) { 714 bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) {
711 DCHECK(!output_surface_lost_); 715 DCHECK(!output_surface_lost_);
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 swap_promise_list_.push_back(swap_promise.Pass()); 1289 swap_promise_list_.push_back(swap_promise.Pass());
1286 } 1290 }
1287 1291
1288 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { 1292 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
1289 for (size_t i = 0; i < swap_promise_list_.size(); i++) 1293 for (size_t i = 0; i < swap_promise_list_.size(); i++)
1290 swap_promise_list_[i]->DidNotSwap(reason); 1294 swap_promise_list_[i]->DidNotSwap(reason);
1291 swap_promise_list_.clear(); 1295 swap_promise_list_.clear();
1292 } 1296 }
1293 1297
1294 } // namespace cc 1298 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698