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

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

Issue 178123003: Make it possible to cancel commits following an animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix bug with calling SetNeedsAnimate after SetNeedsCommit. Created 6 years, 9 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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 732
733 if (!root_layer()) 733 if (!root_layer())
734 return false; 734 return false;
735 735
736 DCHECK(!root_layer()->parent()); 736 DCHECK(!root_layer()->parent());
737 737
738 bool result = UpdateLayers(root_layer(), queue); 738 bool result = UpdateLayers(root_layer(), queue);
739 739
740 micro_benchmark_controller_.DidUpdateLayers(); 740 micro_benchmark_controller_.DidUpdateLayers();
741 741
742 return result; 742 return result || next_commit_forces_redraw_;
743 } 743 }
744 744
745 static Layer* FindFirstScrollableLayer(Layer* layer) { 745 static Layer* FindFirstScrollableLayer(Layer* layer) {
746 if (!layer) 746 if (!layer)
747 return NULL; 747 return NULL;
748 748
749 if (layer->scrollable()) 749 if (layer->scrollable())
750 return layer; 750 return layer;
751 751
752 for (size_t i = 0; i < layer->children().size(); ++i) { 752 for (size_t i = 0; i < layer->children().size(); ++i) {
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 swap_promise_list_.push_back(swap_promise.Pass()); 1312 swap_promise_list_.push_back(swap_promise.Pass());
1313 } 1313 }
1314 1314
1315 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { 1315 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
1316 for (size_t i = 0; i < swap_promise_list_.size(); i++) 1316 for (size_t i = 0; i < swap_promise_list_.size(); i++)
1317 swap_promise_list_[i]->DidNotSwap(reason); 1317 swap_promise_list_[i]->DidNotSwap(reason);
1318 swap_promise_list_.clear(); 1318 swap_promise_list_.clear();
1319 } 1319 }
1320 1320
1321 } // namespace cc 1321 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_perftest.cc » ('j') | cc/trees/layer_tree_host_unittest_animation.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698