Flutter Engine
The Flutter Engine
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
SkEdgeBuilder Class Referenceabstract

#include <SkEdgeBuilder.h>

Inheritance diagram for SkEdgeBuilder:
SkAnalyticEdgeBuilder SkBasicEdgeBuilder

Public Member Functions

int buildEdges (const SkPath &path, const SkIRect *shiftedClip)
 

Protected Types

enum  Combine { kNo_Combine , kPartial_Combine , kTotal_Combine }
 

Protected Member Functions

 SkEdgeBuilder ()=default
 
virtual ~SkEdgeBuilder ()=default
 

Protected Attributes

void ** fEdgeList = nullptr
 
SkTDArray< void * > fList
 
SkSTArenaAlloc< 512 > fAlloc
 

Private Member Functions

virtual char * allocEdges (size_t n, size_t *sizeof_edge)=0
 
virtual SkRect recoverClip (const SkIRect &) const =0
 
virtual void addLine (const SkPoint pts[])=0
 
virtual void addQuad (const SkPoint pts[])=0
 
virtual void addCubic (const SkPoint pts[])=0
 
virtual Combine addPolyLine (const SkPoint pts[], char *edge, char **edgePtr)=0
 

Detailed Description

Definition at line 21 of file SkEdgeBuilder.h.

Member Enumeration Documentation

◆ Combine

enum SkEdgeBuilder::Combine
protected
Enumerator
kNo_Combine 
kPartial_Combine 
kTotal_Combine 

Definition at line 36 of file SkEdgeBuilder.h.

Constructor & Destructor Documentation

◆ SkEdgeBuilder()

SkEdgeBuilder::SkEdgeBuilder ( )
protecteddefault

◆ ~SkEdgeBuilder()

virtual SkEdgeBuilder::~SkEdgeBuilder ( )
protectedvirtualdefault

Member Function Documentation

◆ addCubic()

virtual void SkEdgeBuilder::addCubic ( const SkPoint  pts[])
privatepure virtual

◆ addLine()

virtual void SkEdgeBuilder::addLine ( const SkPoint  pts[])
privatepure virtual

◆ addPolyLine()

virtual Combine SkEdgeBuilder::addPolyLine ( const SkPoint  pts[],
char *  edge,
char **  edgePtr 
)
privatepure virtual

◆ addQuad()

virtual void SkEdgeBuilder::addQuad ( const SkPoint  pts[])
privatepure virtual

◆ allocEdges()

virtual char * SkEdgeBuilder::allocEdges ( size_t  n,
size_t *  sizeof_edge 
)
privatepure virtual

◆ buildEdges()

int SkEdgeBuilder::buildEdges ( const SkPath path,
const SkIRect shiftedClip 
)

Definition at line 377 of file SkEdgeBuilder.cpp.

378 {
379 // If we're convex, then we need both edges, even if the right edge is past the clip.
380 const bool canCullToTheRight = !path.isConvex();
381
382 // We can use our buildPoly() optimization if all the segments are lines.
383 // (Edges are homogeneous and stored contiguously in memory, no need for indirection.)
384 const int count = SkPath::kLine_SegmentMask == path.getSegmentMasks()
385 ? this->buildPoly(path, shiftedClip, canCullToTheRight)
386 : this->build (path, shiftedClip, canCullToTheRight);
387
388 SkASSERT(count >= 0);
389
390 // If we can't cull to the right, we should have count > 1 (or 0).
391 if (!canCullToTheRight) {
392 SkASSERT(count != 1);
393 }
394 return count;
395}
int count
Definition: FontMgrTest.cpp:50
#define SkASSERT(cond)
Definition: SkAssert.h:116
@ kLine_SegmentMask
Definition: SkPath.h:1445
Definition: build.py:1
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57

◆ recoverClip()

virtual SkRect SkEdgeBuilder::recoverClip ( const SkIRect ) const
privatepure virtual

Member Data Documentation

◆ fAlloc

SkSTArenaAlloc<512> SkEdgeBuilder::fAlloc
protected

Definition at line 34 of file SkEdgeBuilder.h.

◆ fEdgeList

void** SkEdgeBuilder::fEdgeList = nullptr
protected

Definition at line 32 of file SkEdgeBuilder.h.

◆ fList

SkTDArray<void*> SkEdgeBuilder::fList
protected

Definition at line 33 of file SkEdgeBuilder.h.


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