Lines Matching refs:rect

16 // BSP node. Space is partitioned by an either vertical or horizontal line. Note that if a rect
25 bool intersects(Rect rect) override {
26 if (GetLoVal(rect) < fSplitCoord && fLo->intersects(rect)) {
29 if (GetHiVal(rect) > fSplitCoord && fHi->intersects(rect)) {
35 Node* addNonIntersecting(Rect rect, SkArenaAlloc* arena) override {
36 if (GetLoVal(rect) < fSplitCoord) {
37 fLo = fLo->addNonIntersecting(rect, arena);
39 if (GetHiVal(rect) > fSplitCoord) {
40 fHi = fHi->addNonIntersecting(rect, arena);
46 SK_ALWAYS_INLINE static float GetLoVal(const Rect& rect) {
47 return (kSplitType == SplitType::kX) ? rect.left() : rect.top();
49 SK_ALWAYS_INLINE static float GetHiVal(const Rect& rect) {
50 return (kSplitType == SplitType::kX) ? rect.right() : rect.bot();
62 // brute force rect comparisons seems to be the optimal number.
81 // Leave the rect arrays untouched. Since we know they are either already valid in the tree,
86 bool intersects(Rect rect) override {
87 // Test for intersection in sets of 4. Since all the data in our rect arrays is either
92 float4 comp = Rect::ComplementRect(rect).fVals;
108 Node* addNonIntersecting(Rect rect, SkArenaAlloc* arena) override {
110 // The new rect doesn't fit. Split our rect list first and then add.
111 return this->split(arena)->addNonIntersecting(rect, arena);
113 this->appendToList(rect);
118 void appendToList(Rect rect) {
122 fSplittableBounds = max(fSplittableBounds, rect.vals());
123 fRectValsSum += rect.vals(); // [sum(left), sum(top), -sum(right), -sum(bot)]
124 fLefts[i] = rect.vals()[0];
125 fTops[i] = rect.vals()[1];
126 fNegRights[i] = rect.vals()[2];
127 fNegBots[i] = rect.vals()[3];
145 // Represents the region of splits that guarantee a strict subdivision of our rect list.
176 Rect rect = this->loadRect(i);
178 this->appendToList(rect);
181 hiNode->appendToList(rect);