Index: ui/views/view.cc |
diff --git a/ui/views/view.cc b/ui/views/view.cc |
index 6cb29e9f85c25b1bed8b71ec853af80f423643cf..c8ebd0abb67cda2dde5193c03c6c364b94e86a87 100644 |
--- a/ui/views/view.cc |
+++ b/ui/views/view.cc |
@@ -782,7 +782,7 @@ void View::Paint(gfx::Canvas* canvas, const CullSet& cull_set) { |
// propagation to our children. |
if (IsPaintRoot()) { |
if (!bounds_tree_) |
- bounds_tree_.reset(new gfx::RTree(2, 5)); |
+ bounds_tree_.reset(new BoundsTree(2, 5)); |
// Recompute our bounds tree as needed. |
UpdateRootBounds(bounds_tree_.get(), gfx::Vector2d()); |
@@ -798,7 +798,8 @@ void View::Paint(gfx::Canvas* canvas, const CullSet& cull_set) { |
// our canvas bounds. |
scoped_ptr<base::hash_set<intptr_t> > damaged_views( |
new base::hash_set<intptr_t>()); |
- bounds_tree_->Query(canvas_bounds, damaged_views.get()); |
+ bounds_tree_->AppendIntersectingRecords( |
+ canvas_bounds, damaged_views.get()); |
// Construct a CullSet to wrap the damaged views set, it will delete it |
// for us on scope exit. |
CullSet paint_root_cull_set(damaged_views.Pass()); |
@@ -1867,7 +1868,7 @@ void View::DoRemoveChildView(View* view, |
// Remove the bounds of this child and any of its descendants from our |
// paint root bounds tree. |
- gfx::RTree* bounds_tree = GetBoundsTreeFromPaintRoot(); |
+ BoundsTree* bounds_tree = GetBoundsTreeFromPaintRoot(); |
if (bounds_tree) |
view->RemoveRootBounds(bounds_tree); |
@@ -2078,7 +2079,7 @@ void View::SetRootBoundsDirty(bool origin_changed) { |
} |
} |
-void View::UpdateRootBounds(gfx::RTree* tree, const gfx::Vector2d& offset) { |
+void View::UpdateRootBounds(BoundsTree* tree, const gfx::Vector2d& offset) { |
// No need to recompute bounds if we haven't flagged ours as dirty. |
TRACE_EVENT1("views", "View::UpdateRootBounds", "class", GetClassName()); |
@@ -2103,7 +2104,7 @@ void View::UpdateRootBounds(gfx::RTree* tree, const gfx::Vector2d& offset) { |
} |
} |
-void View::RemoveRootBounds(gfx::RTree* tree) { |
+void View::RemoveRootBounds(BoundsTree* tree) { |
tree->Remove(reinterpret_cast<intptr_t>(this)); |
root_bounds_dirty_ = true; |
@@ -2114,8 +2115,8 @@ void View::RemoveRootBounds(gfx::RTree* tree) { |
} |
} |
-gfx::RTree* View::GetBoundsTreeFromPaintRoot() { |
- gfx::RTree* bounds_tree = bounds_tree_.get(); |
+View::BoundsTree* View::GetBoundsTreeFromPaintRoot() { |
+ BoundsTree* bounds_tree = bounds_tree_.get(); |
View* paint_root = this; |
while (!bounds_tree && !paint_root->IsPaintRoot()) { |
// Assumption is that if IsPaintRoot() is false then parent_ is valid. |