Flutter Engine
The Flutter Engine
Classes | Public Member Functions | List of all members
GrTriangulator::BreadcrumbTriangleList Class Reference

#include <GrTriangulator.h>

Classes

struct  Node
 

Public Member Functions

const Nodehead () const
 
int count () const
 
void append (SkArenaAlloc *alloc, SkPoint a, SkPoint b, SkPoint c, int winding)
 
void concat (BreadcrumbTriangleList &&list)
 

Detailed Description

Definition at line 236 of file GrTriangulator.h.

Member Function Documentation

◆ append()

void GrTriangulator::BreadcrumbTriangleList::append ( SkArenaAlloc alloc,
SkPoint  a,
SkPoint  b,
SkPoint  c,
int  winding 
)
inline

Definition at line 246 of file GrTriangulator.h.

246 {
247 if (a == b || a == c || b == c || winding == 0) {
248 return;
249 }
250 if (winding < 0) {
251 std::swap(a, b);
252 winding = -winding;
253 }
254 for (int i = 0; i < winding; ++i) {
255 SkASSERT(fTail && !(*fTail));
256 *fTail = alloc->make<Node>(a, b, c);
257 fTail = &(*fTail)->fNext;
258 }
259 fCount += winding;
260 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
void swap(sk_sp< T > &a, sk_sp< T > &b)
Definition: SkRefCnt.h:341
auto make(Ctor &&ctor) -> decltype(ctor(nullptr))
Definition: SkArenaAlloc.h:120
static bool b
struct MyStruct a[10]
Definition: dart.idl:29

◆ concat()

void GrTriangulator::BreadcrumbTriangleList::concat ( BreadcrumbTriangleList &&  list)
inline

Definition at line 262 of file GrTriangulator.h.

262 {
263 SkASSERT(fTail && !(*fTail));
264 if (list.fHead) {
265 *fTail = list.fHead;
266 fTail = list.fTail;
267 fCount += list.fCount;
268 list.fHead = nullptr;
269 list.fTail = &list.fHead;
270 list.fCount = 0;
271 }
272 }

◆ count()

int GrTriangulator::BreadcrumbTriangleList::count ( ) const
inline

Definition at line 244 of file GrTriangulator.h.

244{ return fCount; }

◆ head()

const Node * GrTriangulator::BreadcrumbTriangleList::head ( ) const
inline

Definition at line 243 of file GrTriangulator.h.

243{ return fHead; }

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