OLD | NEW |
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 Loading... |
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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1320 swap_promise_list_.push_back(swap_promise.Pass()); | 1320 swap_promise_list_.push_back(swap_promise.Pass()); |
1321 } | 1321 } |
1322 | 1322 |
1323 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1323 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
1324 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1324 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
1325 swap_promise_list_[i]->DidNotSwap(reason); | 1325 swap_promise_list_[i]->DidNotSwap(reason); |
1326 swap_promise_list_.clear(); | 1326 swap_promise_list_.clear(); |
1327 } | 1327 } |
1328 | 1328 |
1329 } // namespace cc | 1329 } // namespace cc |
OLD | NEW |