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

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

Issue 1427693002: Move SingleThreadProxy::LayoutAndUpdateLayers into LayerTreeHost directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | cc/trees/single_thread_proxy.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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 void LayerTreeHost::NotifyInputThrottledUntilCommit() { 664 void LayerTreeHost::NotifyInputThrottledUntilCommit() {
665 proxy_->NotifyInputThrottledUntilCommit(); 665 proxy_->NotifyInputThrottledUntilCommit();
666 } 666 }
667 667
668 void LayerTreeHost::LayoutAndUpdateLayers() { 668 void LayerTreeHost::LayoutAndUpdateLayers() {
669 DCHECK(!proxy_->HasImplThread()); 669 DCHECK(!proxy_->HasImplThread());
670 // This function is only valid when not using the scheduler. 670 // This function is only valid when not using the scheduler.
671 DCHECK(!settings_.single_thread_proxy_scheduler); 671 DCHECK(!settings_.single_thread_proxy_scheduler);
672 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); 672 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get());
673 673
674 proxy->LayoutAndUpdateLayers(); 674 if (output_surface_lost()) {
675 proxy->RequestNewOutputSurface();
676 // RequestNewOutputSurface could have synchronously created an output
677 // surface, so check again before returning.
678 if (output_surface_lost())
679 return;
680 }
681
682 Layout();
683 UpdateLayers();
675 } 684 }
676 685
677 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { 686 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) {
678 DCHECK(!proxy_->HasImplThread()); 687 DCHECK(!proxy_->HasImplThread());
679 // This function is only valid when not using the scheduler. 688 // This function is only valid when not using the scheduler.
680 DCHECK(!settings_.single_thread_proxy_scheduler); 689 DCHECK(!settings_.single_thread_proxy_scheduler);
681 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); 690 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get());
682 691
683 proxy->CompositeImmediately(frame_begin_time); 692 proxy->CompositeImmediately(frame_begin_time);
684 } 693 }
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) 1229 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id())
1221 : false; 1230 : false;
1222 } 1231 }
1223 1232
1224 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { 1233 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const {
1225 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) 1234 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id())
1226 : false; 1235 : false;
1227 } 1236 }
1228 1237
1229 } // namespace cc 1238 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698