Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
skgpu::graphite::IntersectionTree::TreeNode< kSplitType > Class Template Referencefinal

Inherits skgpu::graphite::IntersectionTree::Node.

Public Member Functions

 TreeNode (float splitCoord, Node *lo, Node *hi)
 
bool intersects (Rect rect) override
 
NodeaddNonIntersecting (Rect rect, SkArenaAlloc *arena) override
 

Detailed Description

template<IntersectionTree::SplitType kSplitType>
class skgpu::graphite::IntersectionTree::TreeNode< kSplitType >

Definition at line 21 of file IntersectionTree.cpp.

Constructor & Destructor Documentation

◆ TreeNode()

template<IntersectionTree::SplitType kSplitType>
skgpu::graphite::IntersectionTree::TreeNode< kSplitType >::TreeNode ( float  splitCoord,
Node lo,
Node hi 
)
inline

Definition at line 23 of file IntersectionTree.cpp.

24 : fSplitCoord(splitCoord), fLo(lo), fHi(hi) {
25 }

Member Function Documentation

◆ addNonIntersecting()

template<IntersectionTree::SplitType kSplitType>
Node * skgpu::graphite::IntersectionTree::TreeNode< kSplitType >::addNonIntersecting ( Rect  rect,
SkArenaAlloc arena 
)
inlineoverride

Definition at line 37 of file IntersectionTree.cpp.

37 {
38 if (GetLoVal(rect) < fSplitCoord) {
39 fLo = fLo->addNonIntersecting(rect, arena);
40 }
41 if (GetHiVal(rect) > fSplitCoord) {
42 fHi = fHi->addNonIntersecting(rect, arena);
43 }
44 return this;
45 }

◆ intersects()

template<IntersectionTree::SplitType kSplitType>
bool skgpu::graphite::IntersectionTree::TreeNode< kSplitType >::intersects ( Rect  rect)
inlineoverride

Definition at line 27 of file IntersectionTree.cpp.

27 {
28 if (GetLoVal(rect) < fSplitCoord && fLo->intersects(rect)) {
29 return true;
30 }
31 if (GetHiVal(rect) > fSplitCoord && fHi->intersects(rect)) {
32 return true;
33 }
34 return false;
35 }

The documentation for this class was generated from the following file: