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

Unified Diff: trunk/src/ui/views/view.cc

Issue 338833004: Revert 276827 "readability review for luken" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/ui/views/view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ui/views/view.cc
===================================================================
--- trunk/src/ui/views/view.cc (revision 277531)
+++ trunk/src/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.
« no previous file with comments | « trunk/src/ui/views/view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698