| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/base/rtree.h" | 5 #include "cc/base/rtree.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 for (uint16_t i = 0; i < node->num_children; ++i) { | 100 for (uint16_t i = 0; i < node->num_children; ++i) { |
| 101 if (query.Intersects(node->children[i].bounds)) { | 101 if (query.Intersects(node->children[i].bounds)) { |
| 102 if (node->level == 0) | 102 if (node->level == 0) |
| 103 results->push_back(node->children[i].index); | 103 results->push_back(node->children[i].index); |
| 104 else | 104 else |
| 105 SearchRecursive(node->children[i].subtree, query, results); | 105 SearchRecursive(node->children[i].subtree, query, results); |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 } | 108 } |
| 109 | 109 |
| 110 gfx::Rect RTree::GetBounds() const { |
| 111 return root_.bounds; |
| 112 } |
| 113 |
| 110 } // namespace cc | 114 } // namespace cc |
| OLD | NEW |