| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 // sorted so we don't have a sorted list for every run after the first | 186 // sorted so we don't have a sorted list for every run after the first |
| 187 LayerImplList test_list = base_list_; | 187 LayerImplList test_list = base_list_; |
| 188 layer_sorter_.Sort(test_list.begin(), test_list.end()); | 188 layer_sorter_.Sort(test_list.begin(), test_list.end()); |
| 189 timer_.NextLap(); | 189 timer_.NextLap(); |
| 190 } while (!timer_.HasTimeLimitExpired()); | 190 } while (!timer_.HasTimeLimitExpired()); |
| 191 | 191 |
| 192 EndTest(); | 192 EndTest(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 void BuildLayerImplList(LayerImpl* layer, LayerImplList* list) { | 195 void BuildLayerImplList(LayerImpl* layer, LayerImplList* list) { |
| 196 if (layer->is_3d_sorted()) { | 196 if (layer->Is3dSorted()) { |
| 197 list->push_back(layer); | 197 list->push_back(layer); |
| 198 } | 198 } |
| 199 | 199 |
| 200 for (unsigned int i = 0; i < layer->children().size(); i++) { | 200 for (unsigned int i = 0; i < layer->children().size(); i++) { |
| 201 BuildLayerImplList(layer->children()[i], list); | 201 BuildLayerImplList(layer->children()[i], list); |
| 202 } | 202 } |
| 203 } | 203 } |
| 204 | 204 |
| 205 private: | 205 private: |
| 206 LayerImplList base_list_; | 206 LayerImplList base_list_; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 } | 262 } |
| 263 | 263 |
| 264 TEST_F(LayerSorterMainTest, LayerSorterRubik) { | 264 TEST_F(LayerSorterMainTest, LayerSorterRubik) { |
| 265 SetTestName("layer_sort_rubik"); | 265 SetTestName("layer_sort_rubik"); |
| 266 ReadTestFile("layer_sort_rubik"); | 266 ReadTestFile("layer_sort_rubik"); |
| 267 RunSortLayers(); | 267 RunSortLayers(); |
| 268 } | 268 } |
| 269 | 269 |
| 270 } // namespace | 270 } // namespace |
| 271 } // namespace cc | 271 } // namespace cc |
| OLD | NEW |