Lines Matching defs:branches
15 std::vector<Branch> branches;
16 branches.reserve(N);
27 branches.push_back(b);
30 fCount = (int)branches.size();
36 n->fChildren[0] = branches[0];
38 fRoot.fBounds = branches[0].fBounds;
41 fRoot = this->bulkLoad(&branches);
57 int SkRTree::CountNodes(int branches) {
58 if (branches == 1) {
61 int numBranches = branches / kMaxChildren;
62 int remainder = branches % kMaxChildren;
73 while (currentBranch < branches) {
86 for (int k = 1; k < incrementBy && currentBranch < branches; ++k) {
93 SkRTree::Branch SkRTree::bulkLoad(std::vector<Branch>* branches, int level) {
94 if (branches->size() == 1) { // Only one branch. It will be the root.
95 return (*branches)[0];
98 // We might sort our branches here, but we expect Blink gives us a reasonable x,y order.
101 int numBranches = (int)branches->size() / kMaxChildren;
102 int remainder = (int)branches->size() % kMaxChildren;
107 // If the remainder isn't enough to fill a node, we'll add fewer nodes to other branches.
116 while (currentBranch < (int)branches->size()) {
130 n->fChildren[0] = (*branches)[currentBranch];
132 b.fBounds = (*branches)[currentBranch].fBounds;
135 for (int k = 1; k < incrementBy && currentBranch < (int)branches->size(); ++k) {
136 b.fBounds.join((*branches)[currentBranch].fBounds);
137 n->fChildren[k] = (*branches)[currentBranch];
141 (*branches)[newBranches] = b;
144 branches->resize(newBranches);
145 return this->bulkLoad(branches, level + 1);