| Index: ui/views/view.cc
|
| ===================================================================
|
| --- ui/views/view.cc (revision 277444)
|
| +++ ui/views/view.cc (working copy)
|
| @@ -782,7 +782,7 @@
|
| // propagation to our children.
|
| if (IsPaintRoot()) {
|
| if (!bounds_tree_)
|
| - bounds_tree_.reset(new BoundsTree(2, 5));
|
| + bounds_tree_.reset(new gfx::RTree(2, 5));
|
|
|
| // Recompute our bounds tree as needed.
|
| UpdateRootBounds(bounds_tree_.get(), gfx::Vector2d());
|
| @@ -798,8 +798,7 @@
|
| // our canvas bounds.
|
| scoped_ptr<base::hash_set<intptr_t> > damaged_views(
|
| new base::hash_set<intptr_t>());
|
| - bounds_tree_->AppendIntersectingRecords(
|
| - canvas_bounds, damaged_views.get());
|
| + bounds_tree_->Query(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());
|
| @@ -1868,7 +1867,7 @@
|
|
|
| // Remove the bounds of this child and any of its descendants from our
|
| // paint root bounds tree.
|
| - BoundsTree* bounds_tree = GetBoundsTreeFromPaintRoot();
|
| + gfx::RTree* bounds_tree = GetBoundsTreeFromPaintRoot();
|
| if (bounds_tree)
|
| view->RemoveRootBounds(bounds_tree);
|
|
|
| @@ -2079,7 +2078,7 @@
|
| }
|
| }
|
|
|
| -void View::UpdateRootBounds(BoundsTree* tree, const gfx::Vector2d& offset) {
|
| +void View::UpdateRootBounds(gfx::RTree* 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());
|
|
|
| @@ -2104,7 +2103,7 @@
|
| }
|
| }
|
|
|
| -void View::RemoveRootBounds(BoundsTree* tree) {
|
| +void View::RemoveRootBounds(gfx::RTree* tree) {
|
| tree->Remove(reinterpret_cast<intptr_t>(this));
|
|
|
| root_bounds_dirty_ = true;
|
| @@ -2115,8 +2114,8 @@
|
| }
|
| }
|
|
|
| -View::BoundsTree* View::GetBoundsTreeFromPaintRoot() {
|
| - BoundsTree* bounds_tree = bounds_tree_.get();
|
| +gfx::RTree* View::GetBoundsTreeFromPaintRoot() {
|
| + gfx::RTree* 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.
|
|
|