Lines Matching refs:branches
154 // divide up the branches
319 SkRTree::Branch SkRTree::bulkLoad(SkTDArray<Branch>* branches, int level) {
320 if (branches->count() == 1) {
322 Branch out = (*branches)[0];
323 branches->rewind();
327 SkTQSort(branches->begin(), branches->end() - 1, RectLessY());
329 int numBranches = branches->count() / fMaxChildren;
330 int remainder = branches->count() % fMaxChildren;
336 // some other branches to make up for it
354 if (end > branches->count()) {
355 end = branches->count();
359 SkTQSort(branches->begin() + begin, branches->begin() + end - 1, RectLessX());
361 for (int j = 0; j < numTiles && currentBranch < branches->count(); ++j) {
375 *n->child(0) = (*branches)[currentBranch];
377 b.fBounds = (*branches)[currentBranch].fBounds;
380 for (int k = 1; k < incrementBy && currentBranch < branches->count(); ++k) {
381 b.fBounds.join((*branches)[currentBranch].fBounds);
382 *n->child(k) = (*branches)[currentBranch];
386 (*branches)[newBranches] = b;
390 branches->setCount(newBranches);
391 return this->bulkLoad(branches, level + 1);