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

Side by Side Diff: cc/base/rtree.cc

Issue 1484163002: Raster display item lists via a visual rect RTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head. Created 5 years 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698