Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
SkCanvasState_v1 Class Reference
Inheritance diagram for SkCanvasState_v1:
SkCanvasState

Public Member Functions

 SkCanvasState_v1 (SkCanvas *canvas)
 
 ~SkCanvasState_v1 ()
 
- Public Member Functions inherited from SkCanvasState
 SkCanvasState (int32_t version, SkCanvas *canvas)
 

Public Attributes

SkMCState mcState
 
int32_t layerCount
 
SkCanvasLayerStatelayers
 
- Public Attributes inherited from SkCanvasState
int32_t version
 
int32_t width
 
int32_t height
 
int32_t alignmentPadding
 

Static Public Attributes

static const int32_t kVersion = 1
 

Detailed Description

Definition at line 112 of file SkCanvasStateUtils.cpp.

Constructor & Destructor Documentation

◆ SkCanvasState_v1()

SkCanvasState_v1::SkCanvasState_v1 ( SkCanvas canvas)
inline

Definition at line 116 of file SkCanvasStateUtils.cpp.

116 : INHERITED(kVersion, canvas) {
117 layerCount = 0;
118 layers = nullptr;
120 mcState.clipRects = nullptr;
121 originalCanvas = canvas;
122 }
static const int32_t kVersion
SkCanvasLayerState * layers
ClipRect * clipRects
int32_t clipRectCount

◆ ~SkCanvasState_v1()

SkCanvasState_v1::~SkCanvasState_v1 ( )
inline

Definition at line 124 of file SkCanvasStateUtils.cpp.

124 {
125 // loop through the layers and free the data allocated to the clipRects.
126 // See setup_MC_state, clipRects is only allocated when the clip isn't empty; and empty
127 // is implicitly represented as clipRectCount == 0.
128 for (int i = 0; i < layerCount; ++i) {
129 if (layers[i].mcState.clipRectCount > 0) {
131 }
132 }
133
134 if (mcState.clipRectCount > 0) {
136 }
137
138 // layers is always allocated, even if it's with sk_malloc(0), so this is safe.
140 }
SK_API void sk_free(void *)

Member Data Documentation

◆ kVersion

const int32_t SkCanvasState_v1::kVersion = 1
static

Definition at line 114 of file SkCanvasStateUtils.cpp.

◆ layerCount

int32_t SkCanvasState_v1::layerCount

Definition at line 144 of file SkCanvasStateUtils.cpp.

◆ layers

SkCanvasLayerState* SkCanvasState_v1::layers

Definition at line 145 of file SkCanvasStateUtils.cpp.

◆ mcState

SkMCState SkCanvasState_v1::mcState

Definition at line 142 of file SkCanvasStateUtils.cpp.


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