Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SkOpEdgeBuilder Class Reference

#include <SkOpEdgeBuilder.h>

Public Member Functions

 SkOpEdgeBuilder (const SkPathWriter &path, SkOpContourHead *contours2, SkOpGlobalState *globalState)
 
 SkOpEdgeBuilder (const SkPath &path, SkOpContourHead *contours2, SkOpGlobalState *globalState)
 
void addOperand (const SkPath &path)
 
void complete ()
 
bool finish ()
 
const SkOpContourhead () const
 
void init ()
 
bool unparseable () const
 
SkPathOpsMask xorMask () const
 

Detailed Description

Definition at line 21 of file SkOpEdgeBuilder.h.

Constructor & Destructor Documentation

◆ SkOpEdgeBuilder() [1/2]

SkOpEdgeBuilder::SkOpEdgeBuilder ( const SkPathWriter path,
SkOpContourHead contours2,
SkOpGlobalState globalState 
)
inline

Definition at line 23 of file SkOpEdgeBuilder.h.

25 : fGlobalState(globalState)
26 , fPath(path.nativePath())
27 , fContourBuilder(contours2)
28 , fContoursHead(contours2)
29 , fAllowOpenContours(true) {
30 init();
31 }
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

◆ SkOpEdgeBuilder() [2/2]

SkOpEdgeBuilder::SkOpEdgeBuilder ( const SkPath path,
SkOpContourHead contours2,
SkOpGlobalState globalState 
)
inline

Definition at line 33 of file SkOpEdgeBuilder.h.

34 : fGlobalState(globalState)
35 , fPath(&path)
36 , fContourBuilder(contours2)
37 , fContoursHead(contours2)
38 , fAllowOpenContours(false) {
39 init();
40 }

Member Function Documentation

◆ addOperand()

void SkOpEdgeBuilder::addOperand ( const SkPath path)

Definition at line 53 of file SkOpEdgeBuilder.cpp.

53 {
54 SkASSERT(!fPathVerbs.empty() && fPathVerbs.back() == SkPath::kDone_Verb);
55 fPathVerbs.pop_back();
56 fPath = &path;
57 fXorMask[1] = ((int)fPath->getFillType() & 1) ? kEvenOdd_PathOpsMask
59 preFetch();
60}
#define SkASSERT(cond)
Definition SkAssert.h:116
@ kWinding_PathOpsMask
@ kEvenOdd_PathOpsMask
Type::kYUV Type::kRGBA() int(0.7 *637)
SkPathFillType getFillType() const
Definition SkPath.h:230
@ kDone_Verb
Definition SkPath.h:1464
const T & back() const
Definition SkTDArray.h:162
bool empty() const
Definition SkTDArray.h:135
void pop_back()
Definition SkTDArray.h:223

◆ complete()

void SkOpEdgeBuilder::complete ( )
inline

Definition at line 44 of file SkOpEdgeBuilder.h.

44 {
45 fContourBuilder.flush();
46 SkOpContour* contour = fContourBuilder.contour();
47 if (contour && contour->count()) {
48 contour->complete();
49 fContourBuilder.setContour(nullptr);
50 }
51 }
void setContour(SkOpContour *contour)
SkOpContour * contour()

◆ finish()

bool SkOpEdgeBuilder::finish ( )

Definition at line 62 of file SkOpEdgeBuilder.cpp.

62 {
63 fOperand = false;
64 if (fUnparseable || !walk()) {
65 return false;
66 }
67 complete();
68 SkOpContour* contour = fContourBuilder.contour();
69 if (contour && !contour->count()) {
70 fContoursHead->remove(contour);
71 }
72 return true;
73}
void remove(SkOpContour *contour)

◆ head()

const SkOpContour * SkOpEdgeBuilder::head ( ) const
inline

Definition at line 55 of file SkOpEdgeBuilder.h.

55 {
56 return fContoursHead;
57 }

◆ init()

void SkOpEdgeBuilder::init ( )

Definition at line 23 of file SkOpEdgeBuilder.cpp.

23 {
24 fOperand = false;
25 fXorMask[0] = fXorMask[1] = ((int)fPath->getFillType() & 1) ? kEvenOdd_PathOpsMask
27 fUnparseable = false;
28 fSecondHalf = preFetch();
29}

◆ unparseable()

bool SkOpEdgeBuilder::unparseable ( ) const
inline

Definition at line 60 of file SkOpEdgeBuilder.h.

60{ return fUnparseable; }

◆ xorMask()

SkPathOpsMask SkOpEdgeBuilder::xorMask ( ) const
inline

Definition at line 61 of file SkOpEdgeBuilder.h.

61{ return fXorMask[fOperand]; }

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